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

12
src/hooks/useMessage.ts

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

6
src/main.ts

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

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

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

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

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

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

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

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

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

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

@ -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 @@
<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 @@
<template> <template>
<div class="device-info-wrap"> <div class="device-info-wrap">
<EdfsWrap class="device-info-from-wrap"> <div class="left-wrap">
<div class="from"> <EdfsWrap class="chart-box" title="设备概览">
<div class="from-input"> <PieChart :data="pieData" />
<div class="from-row"> </EdfsWrap>
<div class="label">设备序列:</div> <div class="filter">
<el-input <LeftFilter @search="onSearch" :categoryTreeData="categoryTreeData" />
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> </div>
</EdfsWrap> </div>
<EdfsWrap title="设备信息列表" class="device-info-table"> <EdfsWrap title="设备信息列表" class="device-info-table">
<EdfsTable <EdfsTable
class="table" class="table"
@ -104,35 +57,28 @@
inner-text="查看" inner-text="查看"
@click="onView(scope.row)" @click="onView(scope.row)"
/><el-divider direction="vertical" /> /><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 <el-dropdown @command="command => handleCommand(command, scope.row)">
link <el-button type="primary" link
type="primary" ><Icon icon="ep:d-arrow-right" /> 更多</el-button
inner-text="设备报修" >
@click="editDevice(scope.row, 'maintain')" <template #dropdown>
v-if="scope.row.status === 3" <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> </template>
</el-table-column> </el-table-column>
</EdfsTable> </EdfsTable>
@ -142,14 +88,19 @@
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import LeftFilter from './components/data-filter.vue'
import EdfsWrap from '@/components/dashboard/Edfs-wrap.vue' import EdfsWrap from '@/components/dashboard/Edfs-wrap.vue'
import EdfsTable from '@/components/dashboard/Edfs-table/index.vue' import EdfsTable from '@/components/dashboard/Edfs-table/index.vue'
import EdfsButton from '@/components/dashboard/Edfs-button/index.vue' import EdfsButton from '@/components/dashboard/Edfs-button/index.vue'
import { isResError } from '@/hooks/useMessage' import { isResError } from '@/hooks/useMessage'
import { dateFormatter } from '@/utils/formatTime'
import type { TableColumnCtx } from 'element-plus' import type { TableColumnCtx } from 'element-plus'
import { useRouter } from 'vue-router' 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 { deviceTableCol, DeviceStatus } from './utils'
import { getCategoryTree, type ICategoryTree } from '@/api/module/eam/device/category' import { getCategoryTree, type ICategoryTree } from '@/api/module/eam/device/category'
@ -159,11 +110,11 @@ const list = ref<IDevice[]>([])
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: undefined, pageSize: undefined,
serialNo: undefined, // serialNo: undefined,
name: undefined, // name: undefined,
status: undefined, // status: undefined,
categoryId: [], // categoryId: [],
createTime: [], // createTime: [],
}) })
const tableRef = ref() const tableRef = ref()
const getList = async () => { const getList = async () => {
@ -172,10 +123,9 @@ const getList = async () => {
} }
loading.value = true loading.value = true
const options = { const options = Object.assign({}, queryParams, filter.value, {
...queryParams, categoryId: filter.value.categoryId?.[filter.value.categoryId.length - 1],
categoryId: queryParams.categoryId?.[queryParams.categoryId.length - 1], })
}
const res = await getDevicePage(options) const res = await getDevicePage(options)
@ -187,22 +137,16 @@ const getList = async () => {
loading.value = false loading.value = false
} }
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
function handleJump(page: number) { function handleJump(page: number) {
queryParams.pageNo = page queryParams.pageNo = page
getList() getList()
} }
function resetQuery() { const filter = ref<any>({})
queryParams.serialNo = undefined function onSearch(search: any) {
queryParams.name = undefined queryParams.pageNo = 1
queryParams.status = undefined filter.value = search
queryParams.categoryId = [] getList()
queryParams.createTime = []
handleQuery()
} }
const categoryTreeData = ref<ICategoryTree[]>([]) const categoryTreeData = ref<ICategoryTree[]>([])
@ -241,6 +185,25 @@ function addDevice() {
function onView(row: any) { function onView(row: any) {
router.push({ path: '/device/deviceOperation', query: { action: 'view', id: row.id } }) 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -248,35 +211,43 @@ function onView(row: any) {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; column-gap: 12px;
row-gap: 10px; box-sizing: border-box;
.device-info-from-wrap { .left-wrap {
height: auto; width: 280px;
width: 100%; min-width: 100px;
.from { height: 100%;
display: flex; background: var(--warp-bg);
flex-direction: column; display: flex;
justify-content: space-around; flex-direction: column;
height: 100%;
width: 100%; box-sizing: border-box;
.from-input { .station {
display: flex; position: relative;
width: 100%; height: 60px;
column-gap: 20px; padding-left: 20px;
row-gap: 10px; border-bottom: 1px solid var(--pagination-border-color);
flex-wrap: wrap; :deep(.el-input__inner) {
.from-row { color: #666;
min-width: 270px; }
display: flex;
align-items: center; :deep(.el-input__wrapper) {
column-gap: 4px; padding: 0;
.label {
white-space: nowrap;
width: 70px;
color: var(--label-color);
}
}
} }
: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 { .device-info-table {

101
src/pages/deviceInfo/info.vue

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

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

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

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

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

4
src/pages/deviceStorage/index.vue

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

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

@ -37,7 +37,7 @@
<template #default="scope"> <template #default="scope">
<template v-if="scope.row.isEdit"> <template v-if="scope.row.isEdit">
<EdfsButton <EdfsButton
type="success" type="primary"
inner-text="确定" inner-text="确定"
v-loading="saveLoading" v-loading="saveLoading"
@click="onCaseSave(scope.row)" @click="onCaseSave(scope.row)"
@ -66,7 +66,7 @@
</template> </template>
</el-table-column> </el-table-column>
</EdfsTable> </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> </el-button>
</div> </div>

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

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

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

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

31
src/pages/home/index.vue

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

4
src/pages/layout.vue

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

20
src/styles/var.css

@ -15,7 +15,7 @@ html[data-theme='dark'] {
--station-header-text-color: #fff; --station-header-text-color: #fff;
--station-info-val-text: #fff; --station-info-val-text: #fff;
--label-color: #c7c8cb; --label-color: #c7c8cb;
--text-desc: #8D9095; --text-desc: #8d9095;
} }
html[data-theme='light'] { html[data-theme='light'] {
@ -40,9 +40,25 @@ html[data-theme='light'] {
html.dark { html.dark {
--el-bg-color: #212327; --el-bg-color: #212327;
/* --el-color-primary: #619925; */
--el-border-color: rgba(255, 255, 255, 0.13); --el-border-color: rgba(255, 255, 255, 0.13);
--el-button-divide-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-bg-color-overlay: #212327;
--el-text-color-regular: #c7c8cb; --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);
font-size: calc($W-scale-ratio-2560 * #{$base-font-size}px); font-size: calc($W-scale-ratio-2560 * #{$base-font-size}px);
} }
} }

Loading…
Cancel
Save