Browse Source

feat: 一些调整

master
wangqi 2 months ago
parent
commit
bfb94b685c
  1. BIN
      src/assets/image/dashboard/common/icon_logo_pg.png
  2. 2
      src/components/dashboard/Edfs-dialog.vue
  3. 12
      src/hooks/useMessage.ts
  4. 6
      src/main.ts
  5. 2
      src/pages/deviceInfo/components/BasicInfo.vue
  6. 2
      src/pages/deviceInfo/components/DeliveryInfo.vue
  7. 4
      src/pages/deviceInfo/components/MaintainInfo.vue
  8. 2
      src/pages/deviceInfo/components/TestInfo.vue
  9. 201
      src/pages/deviceInfo/components/data-filter.vue
  10. 125
      src/pages/deviceInfo/components/pie-chart.vue
  11. 235
      src/pages/deviceInfo/index.vue
  12. 101
      src/pages/deviceInfo/info.vue
  13. 2
      src/pages/deviceStorage/components/data-filter.vue
  14. 1
      src/pages/deviceStorage/components/pie-chart.vue
  15. 4
      src/pages/deviceStorage/index.vue
  16. 4
      src/pages/deviceTest/testPlan/components/CaseDlg.vue
  17. 2
      src/pages/home/components/line-chart.vue
  18. 4
      src/pages/home/components/pie-chart.vue
  19. 31
      src/pages/home/index.vue
  20. 4
      src/pages/layout.vue
  21. 4
      src/pages/ota/firmware/index.vue
  22. 4
      src/pages/ota/upgradeTask/index.vue
  23. 4
      src/pages/system/deviceField/index.vue
  24. 2
      src/pages/system/dict/data/index.vue
  25. 2
      src/pages/system/dict/index.vue
  26. 2
      src/pages/system/loginlog/index.vue
  27. 2
      src/pages/system/operatelog/index.vue
  28. 2
      src/pages/system/role/index.vue
  29. 4
      src/pages/system/tenant/index.vue
  30. 2
      src/pages/system/user/index.vue
  31. 20
      src/styles/var.css
  32. 1
      src/styles/variables.scss

BIN
src/assets/image/dashboard/common/icon_logo_pg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 551 B

2
src/components/dashboard/Edfs-dialog.vue

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
<template v-if="isShowFooter">
<div class="dialog-footer">
<edfs-button
type="success"
type="primary"
@click="onSave"
:loading="btnLoading"
inner-text="确定"

12
src/hooks/useMessage.ts

@ -59,6 +59,8 @@ export const useMessage = () => { @@ -59,6 +59,8 @@ export const useMessage = () => {
return ElMessageBox.confirm(content, tip ? tip : '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'el-button--success',
cancelButtonClass: 'el-button--default',
type: 'warning',
})
},
@ -68,6 +70,8 @@ export const useMessage = () => { @@ -68,6 +70,8 @@ export const useMessage = () => {
showCancelButton: false,
closeOnClickModal: false,
closeOnPressEscape: false,
confirmButtonClass: 'el-button--success',
cancelButtonClass: 'el-button--default',
showClose: false,
type: 'warning',
})
@ -82,6 +86,8 @@ export const useMessage = () => { @@ -82,6 +86,8 @@ export const useMessage = () => {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'el-button--success',
cancelButtonClass: 'el-button--default',
}
)
.then(() => {
@ -100,6 +106,8 @@ export const useMessage = () => { @@ -100,6 +106,8 @@ export const useMessage = () => {
{
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'el-button--success',
cancelButtonClass: 'el-button--default',
type: 'warning',
}
)
@ -109,6 +117,8 @@ export const useMessage = () => { @@ -109,6 +117,8 @@ export const useMessage = () => {
return ElMessageBox.prompt(content, tip, {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'el-button--success',
cancelButtonClass: 'el-button--default',
type: 'warning',
})
},
@ -120,6 +130,8 @@ export const useMessage = () => { @@ -120,6 +130,8 @@ export const useMessage = () => {
return ElMessageBox.prompt(content, tip, {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'el-button--success',
cancelButtonClass: 'el-button--default',
inputPattern: PatternRegExp,
inputErrorMessage: inputErrorMessage,
type: 'warning',

6
src/main.ts

@ -1,12 +1,10 @@ @@ -1,12 +1,10 @@
import './styles/index.scss'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from '@/pages/App.vue'
import router from '@/router'
import i18n from '@/locales/index'
import 'element-plus/dist/index.css'
import './styles/index.scss'
// 权限
import { setupAuth } from '@/directives'

2
src/pages/deviceInfo/components/BasicInfo.vue

@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
</div>
<EdfsButton
inner-text="提交基础信息"
type="success"
type="primary"
class="save-button"
v-if="isShowSaveButton"
@click="onSave"

2
src/pages/deviceInfo/components/DeliveryInfo.vue

@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
</div>
<EdfsButton
inner-text="出库"
type="success"
type="primary"
class="save-button"
@click="onSave"
v-if="isShowSaveButton"

4
src/pages/deviceInfo/components/MaintainInfo.vue

@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
<template v-if="scope.row.isEdit">
<EdfsButton
link
type="success"
type="primary"
inner-text="确定"
v-if="scope.row.isEdit"
@click="onSave(scope.row)"
@ -114,7 +114,7 @@ @@ -114,7 +114,7 @@
style="width: 100%"
@click="addMaintain"
v-if="action !== 'view'"
type="success"
type="primary"
>
添加维修信息
</el-button>

2
src/pages/deviceInfo/components/TestInfo.vue

@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
</EdfsTable>
<EdfsButton
inner-text="提交并入库"
type="success"
type="primary"
class="save-button"
v-if="isShowSaveButton"
@click="onSave"

201
src/pages/deviceInfo/components/data-filter.vue

@ -0,0 +1,201 @@ @@ -0,0 +1,201 @@
<template>
<div class="storage-data-filter">
<div class="time-item">
<el-config-provider :locale="locale">
<span>开始时间:</span>
<div class="item item-time">
<el-date-picker
class="data-picker"
v-model="filterData.startDay"
type="date"
placeholder="请选择时间"
value-format="YYYY-MM-DD HH:mm:ss"
:clearable="false"
:editable="false"
/>
<el-checkbox v-model="checkbox.startDay" size="large" />
</div>
<span>终止时间:</span>
<div class="item item-time">
<el-date-picker
class="data-picker"
v-model="filterData.endDay"
type="date"
placeholder="请选择时间"
value-format="YYYY-MM-DD HH:mm:ss"
:clearable="false"
:editable="false"
:disabled-date="endDisabledDate"
/>
<el-checkbox v-model="checkbox.endDay" size="large" />
</div>
</el-config-provider>
</div>
<div class="item">
<el-input placeholder="请输入设备序列号" v-model="filterData.serialNo" />
<el-checkbox v-model="checkbox.serialNo" size="large" />
</div>
<div class="item">
<el-input placeholder="请输入设备名称" v-model="filterData.name" />
<el-checkbox v-model="checkbox.name" size="large" />
</div>
<div class="item">
<el-cascader
v-model="filterData.categoryId"
:options="categoryTreeData"
placeholder="请选择设备分类"
:props="{
checkStrictly: true,
value: 'id',
label: 'name',
}"
/>
<el-checkbox v-model="checkbox.categoryId" size="large" />
</div>
<div class="item item-btn">
<EdfsButton
inner-text="搜索"
type="primary"
style="width: 100%"
@click="onSearch"
/>
<EdfsButton inner-text="重置" style="width: 100%" @click="onReset" />
</div>
</div>
</template>
<script setup lang="ts">
import dayjs from 'dayjs'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import EdfsButton from '@/components/dashboard/Edfs-button/index.vue'
import type { CustomerVO } from '@/api/module/eam/customer'
const locale = zhCn
const prop = defineProps<{
categoryTreeData: Array<Pick<CustomerVO, 'id' | 'name'>>
}>()
const endDisabledDate = (time: Date) => {
return (
time.getTime() <
dayjs(filterData.value.startDay).add(1, 'days').startOf('day').valueOf()
)
}
const emit = defineEmits(['search'])
type FilterKeys = keyof typeof filterData.value
const filterData = ref({
startDay: '',
endDay: '',
name: '',
serialNo: '',
categoryId: [],
})
const checkbox = ref<Record<FilterKeys, boolean>>({
startDay: false,
endDay: false,
name: false,
serialNo: false,
categoryId: false,
})
function onSearch() {
emit('search', formatParams())
}
function formatParams() {
const params: Partial<Record<FilterKeys, string>> = {}
const keys = Object.keys(checkbox.value) as FilterKeys[]
for (const key of keys) {
if (checkbox.value[key]) {
if (key === 'startDay' || key === 'endDay') {
params['createTime'] = [filterData.value.startDay, filterData.value.endDay]
} else {
params[key] = filterData.value[key]
}
}
}
return params
}
function onReset() {
filterData.value = {
startDay: '',
endDay: '',
name: '',
serialNo: '',
categoryId: [],
}
checkbox.value = {
startDay: false,
endDay: false,
name: false,
serialNo: false,
categoryId: false,
}
onSearch()
}
onMounted(() => {
onSearch()
})
</script>
<style lang="scss" scoped>
.storage-data-filter {
padding: 16px;
box-sizing: border-box;
span {
font-size: 14px;
color: var(--label-color);
}
.time-item {
margin-bottom: 32px;
.item {
margin-top: 0;
margin-bottom: 16px;
}
}
.item {
margin-top: 16px;
height: 32px;
display: flex;
align-items: center;
:deep(.el-checkbox:last-of-type) {
margin-left: 8px;
}
}
.item-btn {
margin-top: 36px;
}
:deep(.data-picker) {
width: 100%;
}
:deep(.el-input__icon) {
// margin: 0;
}
:deep(.el-date-editor .el-input__wrapper) {
height: 100%;
line-height: 100%;
flex-direction: row-reverse;
box-sizing: border-box;
padding: 1px 0 1px 11px;
}
:deep(.el-input__icon),
:deep(.el-input__prefix-inner),
:deep(.el-input__prefix),
:deep(.perfix-icon) {
height: 100%;
}
}
</style>

125
src/pages/deviceInfo/components/pie-chart.vue

@ -0,0 +1,125 @@ @@ -0,0 +1,125 @@
<template>
<v-chart class="chart" :option="option" :autoresize="autoresize" />
</template>
<script setup lang="ts">
import VChart from 'vue-echarts'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { PieChart } from 'echarts/charts'
import {
TitleComponent,
TooltipComponent,
LegendComponent,
GraphicComponent,
} from 'echarts/components'
import type { EChartsOption } from 'echarts'
import { useTheme } from '@/utils/useTheme'
use([
CanvasRenderer,
PieChart,
TitleComponent,
TooltipComponent,
GraphicComponent,
LegendComponent,
])
interface Props {
data: any[]
}
const { chartGraphicTextColor } = useTheme()
const props = withDefaults(defineProps<Props>(), {
data: () => [],
})
const updateTrigger = ref(0)
const autoresize = {
throttle: 2500,
onResize: () => {
updateTrigger.value++
},
}
//
const total = computed(() => props.data.reduce((acc, cur) => acc + cur.value, 0))
const option = computed(() => {
const trigger = updateTrigger.value
const res: EChartsOption = {
tooltip: {
show: false,
},
graphic: {
elements: [
{
type: 'text',
left: 'center',
top: '30%',
style: {
text: total.value.toString(),
fill: chartGraphicTextColor.value,
fontSize: 20,
fontWeight: 700,
},
},
{
type: 'text',
left: 'center',
top: '42%',
style: {
text: '设备总数',
fill: chartGraphicTextColor.value,
fontSize: 16,
},
},
],
},
legend: {
show: true,
bottom: '3%',
itemWidth: 20,
itemHeight: 15,
itemGap: 10,
textStyle: {
fontSize: 16,
},
selectedMode: false,
},
color: ['#4CAF50', '#2196F3', '#FBB852', '#FF9800', '#F44336', '#ccc'],
series: [
{
type: 'pie',
radius: ['40%', '55%'],
center: ['50%', '40%'],
data: props.data,
avoidLabelOverlap: false,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 1,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
label: {
show: true,
position: 'outside',
// formatter: '{b}: {c} ({d}%)',
formatter: ' {c}',
},
labelLine: {
show: true,
},
},
],
}
return res
})
</script>
<style scoped lang="scss">
.chart {
width: 100%;
height: 100%;
}
</style>

235
src/pages/deviceInfo/index.vue

@ -1,60 +1,13 @@ @@ -1,60 +1,13 @@
<template>
<div class="device-info-wrap">
<EdfsWrap class="device-info-from-wrap">
<div class="from">
<div class="from-input">
<div class="from-row">
<div class="label">设备序列:</div>
<el-input
v-model="queryParams.serialNo"
placeholder="请输入设备序列号"
clearable
@keyup.enter="handleQuery"
/>
</div>
<div class="from-row">
<div class="label">设备名称:</div>
<el-input
v-model="queryParams.name"
placeholder="请输入设备名称"
clearable
@keyup.enter="handleQuery"
/>
</div>
<div class="from-row">
<div class="label">注册时段:</div>
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
/>
</div>
<div class="from-row">
<div class="label">设备类别:</div>
<el-cascader
class="input"
v-model="queryParams.categoryId"
:options="categoryTreeData"
:props="{
checkStrictly: true,
value: 'id',
label: 'name',
}"
/>
</div>
<div class="btn-group">
<el-button @click="addDevice"><Icon icon="ep:plus" />添加设备</el-button>
<el-button @click="handleQuery"><Icon icon="ep:search" />搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" />重置</el-button>
</div>
</div>
<div class="left-wrap">
<EdfsWrap class="chart-box" title="设备概览">
<PieChart :data="pieData" />
</EdfsWrap>
<div class="filter">
<LeftFilter @search="onSearch" :categoryTreeData="categoryTreeData" />
</div>
</EdfsWrap>
</div>
<EdfsWrap title="设备信息列表" class="device-info-table">
<EdfsTable
class="table"
@ -104,35 +57,28 @@ @@ -104,35 +57,28 @@
inner-text="查看"
@click="onView(scope.row)"
/><el-divider direction="vertical" />
<EdfsButton
link
type="primary"
inner-text="编辑基础信息"
@click="editDevice(scope.row, 'info')"
v-if="scope.row.status < 2"
/>
<EdfsButton
link
type="primary"
inner-text="测试结果录入"
@click="editDevice(scope.row, 'test')"
v-if="scope.row.status === 1"
/>
<EdfsButton
link
type="primary"
inner-text="出库"
@click="editDevice(scope.row, 'delivery')"
v-if="scope.row.status === 2"
/>
<EdfsButton
link
type="primary"
inner-text="设备报修"
@click="editDevice(scope.row, 'maintain')"
v-if="scope.row.status === 3"
/>
<el-dropdown @command="command => handleCommand(command, scope.row)">
<el-button type="primary" link
><Icon icon="ep:d-arrow-right" /> 更多</el-button
>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="info" v-if="scope.row.status < 2">
<Icon icon="solar:clapperboard-edit-linear" />编辑基础信息
</el-dropdown-item>
<el-dropdown-item command="test" v-if="scope.row.status === 1">
<Icon icon="solar:document-add-outline" />测试结果录入
</el-dropdown-item>
<el-dropdown-item command="delivery" v-if="scope.row.status === 2">
<Icon icon="solar:inbox-out-outline" />出库
</el-dropdown-item>
<el-dropdown-item command="maintain" v-if="scope.row.status === 3">
<Icon icon="solar:minimalistic-magnifer-bug-outline" />设备报修
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</el-table-column>
</EdfsTable>
@ -142,14 +88,19 @@ @@ -142,14 +88,19 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import LeftFilter from './components/data-filter.vue'
import EdfsWrap from '@/components/dashboard/Edfs-wrap.vue'
import EdfsTable from '@/components/dashboard/Edfs-table/index.vue'
import EdfsButton from '@/components/dashboard/Edfs-button/index.vue'
import { isResError } from '@/hooks/useMessage'
import { dateFormatter } from '@/utils/formatTime'
import type { TableColumnCtx } from 'element-plus'
import { useRouter } from 'vue-router'
import { getDevicePage, type IDevice } from '@/api/module/eam/device'
import PieChart from './components/pie-chart.vue'
import {
getDevicePage,
getDeviceSummaryByStatus,
type IDevice,
} from '@/api/module/eam/device'
import { deviceTableCol, DeviceStatus } from './utils'
import { getCategoryTree, type ICategoryTree } from '@/api/module/eam/device/category'
@ -159,11 +110,11 @@ const list = ref<IDevice[]>([]) @@ -159,11 +110,11 @@ const list = ref<IDevice[]>([])
const queryParams = reactive({
pageNo: 1,
pageSize: undefined,
serialNo: undefined,
name: undefined,
status: undefined,
categoryId: [],
createTime: [],
// serialNo: undefined,
// name: undefined,
// status: undefined,
// categoryId: [],
// createTime: [],
})
const tableRef = ref()
const getList = async () => {
@ -172,10 +123,9 @@ const getList = async () => { @@ -172,10 +123,9 @@ const getList = async () => {
}
loading.value = true
const options = {
...queryParams,
categoryId: queryParams.categoryId?.[queryParams.categoryId.length - 1],
}
const options = Object.assign({}, queryParams, filter.value, {
categoryId: filter.value.categoryId?.[filter.value.categoryId.length - 1],
})
const res = await getDevicePage(options)
@ -187,22 +137,16 @@ const getList = async () => { @@ -187,22 +137,16 @@ const getList = async () => {
loading.value = false
}
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
function handleJump(page: number) {
queryParams.pageNo = page
getList()
}
function resetQuery() {
queryParams.serialNo = undefined
queryParams.name = undefined
queryParams.status = undefined
queryParams.categoryId = []
queryParams.createTime = []
handleQuery()
const filter = ref<any>({})
function onSearch(search: any) {
queryParams.pageNo = 1
filter.value = search
getList()
}
const categoryTreeData = ref<ICategoryTree[]>([])
@ -241,6 +185,25 @@ function addDevice() { @@ -241,6 +185,25 @@ function addDevice() {
function onView(row: any) {
router.push({ path: '/device/deviceOperation', query: { action: 'view', id: row.id } })
}
function handleCommand(command: string, row: any) {
editDevice(row, command)
}
const pieData = ref<any>([])
async function loadPieChartData() {
const res = await getDeviceSummaryByStatus()
if (isResError(res)) return
pieData.value = res.data.map((item: any) => {
return {
name: item.statusName,
value: item.count,
}
})
}
onMounted(() => {
loadPieChartData()
})
</script>
<style lang="scss" scoped>
@ -248,35 +211,43 @@ function onView(row: any) { @@ -248,35 +211,43 @@ function onView(row: any) {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
row-gap: 10px;
.device-info-from-wrap {
height: auto;
width: 100%;
.from {
display: flex;
flex-direction: column;
justify-content: space-around;
height: 100%;
width: 100%;
.from-input {
display: flex;
width: 100%;
column-gap: 20px;
row-gap: 10px;
flex-wrap: wrap;
.from-row {
min-width: 270px;
display: flex;
align-items: center;
column-gap: 4px;
.label {
white-space: nowrap;
width: 70px;
color: var(--label-color);
}
}
column-gap: 12px;
box-sizing: border-box;
.left-wrap {
width: 280px;
min-width: 100px;
height: 100%;
background: var(--warp-bg);
display: flex;
flex-direction: column;
box-sizing: border-box;
.station {
position: relative;
height: 60px;
padding-left: 20px;
border-bottom: 1px solid var(--pagination-border-color);
:deep(.el-input__inner) {
color: #666;
}
:deep(.el-input__wrapper) {
padding: 0;
}
:deep(.el-input__suffix) {
display: none;
}
}
.chart-box {
height: 300px;
}
.filter {
height: calc(100% - 300px);
overflow: hidden;
}
:deep(.edfs-wrap) {
box-shadow: none;
}
}
.device-info-table {

101
src/pages/deviceInfo/info.vue

@ -1,50 +1,52 @@ @@ -1,50 +1,52 @@
<template>
<EdfsButton
inner-text="返 回"
type="success"
style="width: 80px"
@click="
() => {
router.go(-1)
}
"
/>
<el-scrollbar class="demo-collapse">
<el-collapse v-model="activeNames" @change="handleChange">
<template v-for="item in collapses">
<el-collapse-item :name="item.name" :icon="CaretRight">
<template #title>
<div class="title">
<div class="title-rect"></div>
<div class="title-text">
{{ item.title }}
<div class="device-info-wrap">
<EdfsButton
inner-text="返回上一页"
type="primary"
class="back-btn"
@click="
() => {
router.go(-1)
}
"
/>
<el-scrollbar class="demo-collapse">
<el-collapse v-model="activeNames" @change="handleChange">
<template v-for="item in collapses">
<el-collapse-item :name="item.name" :icon="CaretRight">
<template #title>
<div class="title">
<div class="title-rect"></div>
<div class="title-text">
{{ item.title }}
</div>
</div>
</div>
</template>
<BasicInfo
v-if="item.name === 'info'"
:info="deviceInfo"
:disabled="isDisabledInfo"
@onSave="loadDeviceInfo"
/>
<TestInfo
v-else-if="item.name === 'test'"
:info="deviceInfo"
:disabled="isDisabledTest"
@onSave="loadDeviceInfo"
/>
<DeliveryInfo
:info="deviceInfo"
:disabled="false"
:deviceId="deviceInfoId"
v-else-if="item.name === 'delivery'"
@onSave="loadDeviceInfo"
/>
<MaintainInfo :deviceId="deviceInfoId" v-else-if="item.name === 'maintain'" />
</el-collapse-item>
</template>
</el-collapse>
</el-scrollbar>
</template>
<BasicInfo
v-if="item.name === 'info'"
:info="deviceInfo"
:disabled="isDisabledInfo"
@onSave="loadDeviceInfo"
/>
<TestInfo
v-else-if="item.name === 'test'"
:info="deviceInfo"
:disabled="isDisabledTest"
@onSave="loadDeviceInfo"
/>
<DeliveryInfo
:info="deviceInfo"
:disabled="false"
:deviceId="deviceInfoId"
v-else-if="item.name === 'delivery'"
@onSave="loadDeviceInfo"
/>
<MaintainInfo :deviceId="deviceInfoId" v-else-if="item.name === 'maintain'" />
</el-collapse-item>
</template>
</el-collapse>
</el-scrollbar>
</div>
</template>
<script setup lang="ts">
@ -133,7 +135,16 @@ onMounted(async () => { @@ -133,7 +135,16 @@ onMounted(async () => {
</script>
<style scoped lang="scss">
.device-info-wrap {
background-color: var(--warp-bg);
width: 100%;
height: 100%;
.back-btn {
margin: 10px 10px;
}
}
.demo-collapse {
height: calc(100% - 50px);
:deep(.el-collapse-item__arrow) {
margin: 0 0 0 4px;
}

2
src/pages/deviceStorage/components/data-filter.vue

@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
<div class="item item-btn">
<EdfsButton
inner-text="搜索"
type="success"
type="primary"
style="width: 100%"
@click="onSearch"
/>

1
src/pages/deviceStorage/components/pie-chart.vue

@ -84,6 +84,7 @@ const option = computed(() => { @@ -84,6 +84,7 @@ const option = computed(() => {
textStyle: {
fontSize: 14,
},
selectedMode: false,
},
color: ['#437BF8', '#F84343', '#D1D1D1 ', '#FBB852'],
series: [

4
src/pages/deviceStorage/index.vue

@ -55,14 +55,14 @@ @@ -55,14 +55,14 @@
<template #default="scope">
<EdfsButton
link
type="success"
type="primary"
inner-text="添加维修信息"
v-if="scope.row.status === 3"
@click="addMaintain(scope.row)"
/>
<EdfsButton
link
type="success"
type="primary"
v-else-if="scope.row.status === 2"
inner-text="添加出库信息"
@click="addOutStorage(scope.row)"

4
src/pages/deviceTest/testPlan/components/CaseDlg.vue

@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
<template #default="scope">
<template v-if="scope.row.isEdit">
<EdfsButton
type="success"
type="primary"
inner-text="确定"
v-loading="saveLoading"
@click="onCaseSave(scope.row)"
@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
</template>
</el-table-column>
</EdfsTable>
<el-button class="mt-4" style="width: 100%" @click="addCase" type="success">
<el-button class="mt-4" style="width: 100%" @click="addCase" type="primary">
添加测试用例
</el-button>
</div>

2
src/pages/home/components/line-chart.vue

@ -61,7 +61,7 @@ const chartOption = computed<EChartsOption>(() => { @@ -61,7 +61,7 @@ const chartOption = computed<EChartsOption>(() => {
left: 50,
right: 10,
top: '8%',
bottom: 50,
bottom: 30,
},
tooltip: {
trigger: 'axis',

4
src/pages/home/components/pie-chart.vue

@ -55,7 +55,7 @@ const option = computed(() => { @@ -55,7 +55,7 @@ const option = computed(() => {
{
type: 'text',
left: 'center',
top: '36%',
top: '34%',
style: {
text: total.value.toString(),
fill: chartGraphicTextColor.value,
@ -66,7 +66,7 @@ const option = computed(() => { @@ -66,7 +66,7 @@ const option = computed(() => {
{
type: 'text',
left: 'center',
top: '42%',
top: '42.4%',
style: {
text: '设备总数',
fill: chartGraphicTextColor.value,

31
src/pages/home/index.vue

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
<EdfsButton
:inner-text="name"
@click="onTimeSearch(key)"
:type="currentFilter === key ? 'success' : ''"
:type="currentFilter === key ? 'success' : 'default'"
/>
</template>
</el-button-group>
@ -39,8 +39,8 @@ @@ -39,8 +39,8 @@
<div class="shortcut-list">
<template v-for="(item, idx) in shortcutList" :key="idx">
<div class="item" @click="onShortcutClick(item)">
<el-button :type="item.type as any" circle size="large">
<Icon :icon="item.icon" :size="24" />
<el-button :color="item.color" circle size="large">
<Icon :icon="item.icon" :size="36" />
</el-button>
<span>{{ item.title }}</span>
</div>
@ -72,19 +72,25 @@ const shortcutList = [ @@ -72,19 +72,25 @@ const shortcutList = [
{
title: '设备管理',
icon: 'solar:server-square-linear',
type: 'primary',
color: '#1E90FF',
path: '/device/data',
},
{
title: '设备添加',
icon: 'solar:add-circle-linear',
color: '#619925',
path: 'device/deviceOperation?action=create',
},
{
title: '设备库存',
icon: 'solar:box-outline',
type: 'success',
color: '#909399',
path: '/storage',
},
{
title: '测试计划',
icon: 'codicon:code-oss',
type: 'warning',
color: '#FF9800',
path: '/testSheet/plan',
},
]
@ -210,6 +216,7 @@ onMounted(() => { @@ -210,6 +216,7 @@ onMounted(() => {
overflow: hidden;
background-color: var(--warp-bg);
height: 100%;
color: #fff;
width: 33%;
padding: 0 30px;
align-items: center;
@ -247,11 +254,11 @@ onMounted(() => { @@ -247,11 +254,11 @@ onMounted(() => {
}
}
footer {
height: 140px;
height: 180px;
.shortcut-list {
display: flex;
align-items: center;
column-gap: 18px;
column-gap: 28px;
}
.item {
display: flex;
@ -260,16 +267,20 @@ onMounted(() => { @@ -260,16 +267,20 @@ onMounted(() => {
cursor: pointer;
span {
margin-top: 8px;
font-size: 16px;
color: var(--label-color);
}
:deep(.el-icon) {
color: #fff;
}
}
:deep(.wrap-body) {
padding-top: 0;
padding-left: 20px;
}
:deep(.el-button) {
width: 52px;
height: 52px;
width: 84px;
height: 84px;
}
}
}

4
src/pages/layout.vue

@ -270,8 +270,8 @@ $header-height: 48px; @@ -270,8 +270,8 @@ $header-height: 48px;
font-weight: 400;
.logo-icon {
width: 27px;
height: 27px;
width: 22px;
height: 22px;
}
.logo-label {

4
src/pages/ota/firmware/index.vue

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<template #title-right>
<div class="firmware-table-title">
<EdfsButton
type="success"
type="primary"
inner-text="新增固件"
:icon="createIcon"
@click="addFirmware"
@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
<!-- <el-table-column label="操作" min-width="14%">
<template #default="scope">
<EdfsButton
type="success"
type="primary"
link
inner-text="下载固件"
@click="onDownload(scope.row)"

4
src/pages/ota/upgradeTask/index.vue

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<template #title-right>
<div class="task-table-title">
<EdfsButton
type="success"
type="primary"
inner-text="创建升级任务"
:icon="createIcon"
@click="addTask"
@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
<el-table-column label="操作" min-width="8%">
<template #default="scope">
<EdfsButton
type="success"
type="primary"
link
v-if="scope.row.status === 1 || scope.row.status === 2"
inner-text="详情"

4
src/pages/system/deviceField/index.vue

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
<EdfsWrap title="设备类别管理" class="category-box">
<template #title-right>
<EdfsButton
type="success"
type="primary"
:icon="plusIcon"
inner-text="新增"
@click="addCategory"
@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
<!-- <EdfsWrap title="设备处置/报废/故障 常用原因管理" class="cause-box">
<template #title-right>
<EdfsButton
type="success"
type="primary"
:icon="plusIcon"
inner-text="新增"
/>

2
src/pages/system/dict/data/index.vue

@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
<Icon icon="ep:plus" /> 新增
</el-button>
<el-button
type="success"
type="primary"
plain
@click="handleExport"
:loading="exportLoading"

2
src/pages/system/dict/index.vue

@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
v-hasPermi="['system:dict:export']"
:loading="exportLoading"
plain
type="success"
type="primary"
@click="handleExport"
>
<Icon icon="ep:download" />

2
src/pages/system/loginlog/index.vue

@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
<el-button @click="handleQuery"><Icon icon="ep:search" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" /> 重置</el-button>
<el-button
type="success"
type="primary"
plain
@click="handleExport"
:loading="exportLoading"

2
src/pages/system/operatelog/index.vue

@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
<el-button @click="handleQuery"><Icon icon="ep:search" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" /> 重置</el-button>
<el-button
type="success"
type="primary"
plain
@click="handleExport"
:loading="exportLoading"

2
src/pages/system/role/index.vue

@ -67,7 +67,7 @@ @@ -67,7 +67,7 @@
v-hasPermi="['system:role:export']"
:loading="exportLoading"
plain
type="success"
type="primary"
@click="handleExport"
>
<Icon icon="ep:download" />

4
src/pages/system/tenant/index.vue

@ -75,7 +75,7 @@ @@ -75,7 +75,7 @@
新增
</el-button>
<el-button
type="success"
type="primary"
plain
@click="handleExport"
:loading="exportLoading"
@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
<el-tag v-if="scope.row.packageId === 0" type="danger">系统租户</el-tag>
<template v-else v-for="item in packageList">
<el-tag
type="success"
type="primary"
:key="item.id"
v-if="item.id === scope.row.packageId"
>

2
src/pages/system/user/index.vue

@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
<Icon icon="ep:upload" /> 导入
</el-button>
<el-button
type="success"
type="primary"
plain
@click="handleExport"
:loading="exportLoading"

20
src/styles/var.css

@ -15,7 +15,7 @@ html[data-theme='dark'] { @@ -15,7 +15,7 @@ html[data-theme='dark'] {
--station-header-text-color: #fff;
--station-info-val-text: #fff;
--label-color: #c7c8cb;
--text-desc: #8D9095;
--text-desc: #8d9095;
}
html[data-theme='light'] {
@ -40,9 +40,25 @@ html[data-theme='light'] { @@ -40,9 +40,25 @@ html[data-theme='light'] {
html.dark {
--el-bg-color: #212327;
/* --el-color-primary: #619925; */
--el-border-color: rgba(255, 255, 255, 0.13);
--el-button-divide-border-color: rgba(255, 255, 255, 0.13);
--el-bg-color-overlay: #212327;
--el-text-color-regular: #c7c8cb;
--el-color-primary: #619925;
--el-color-primary-light-3: rgb(78.1, 141.8, 46.6);
--el-color-primary-light-5: rgb(61.5, 107, 39);
--el-color-primary-light-7: rgb(44.9, 72.2, 31.4);
--el-color-primary-light-8: rgb(36.6, 54.8, 27.6);
--el-color-primary-light-9: rgb(28.3, 37.4, 23.8);
--el-color-primary-dark-2: rgb(133.4, 206.2, 97.4);
}
html.light {
--el-color-primary: #619925;
--el-color-primary-light-3: rgb(148.6, 212.3, 117.1);
--el-color-primary-light-5: rgb(179, 224.5, 156.5);
--el-color-primary-light-7: rgb(209.4, 236.7, 195.9);
--el-color-primary-light-8: rgb(224.6, 242.8, 215.6);
--el-color-primary-light-9: rgb(239.8, 248.9, 235.3);
--el-color-primary-dark-2: rgb(82.4, 155.2, 46.4);
}

1
src/styles/variables.scss

@ -45,3 +45,4 @@ $H-scale-ratio-1440: math.div(1440, 1080); @@ -45,3 +45,4 @@ $H-scale-ratio-1440: math.div(1440, 1080);
font-size: calc($W-scale-ratio-2560 * #{$base-font-size}px);
}
}

Loading…
Cancel
Save