修改测试bug

This commit is contained in:
GGJ
2024-12-23 11:30:28 +08:00
parent b10854971d
commit 90efcc4ad2
20 changed files with 209 additions and 54 deletions

View File

@@ -29,3 +29,17 @@ export function getTheme() {
method: 'get' method: 'get'
}) })
} }
export function addVersion(data:any) {
return createAxios({
url: '/cs-system-boot/appVersion/add',
method: 'post',
data
})
}
export function getLastData(data:any) {
return createAxios({
url: '/cs-system-boot/appVersion/getLastData',
method: 'post',
params:data
})
}

View File

@@ -1049,6 +1049,7 @@ export default {
}, },
}, },
splitLine: { splitLine: {
show: false,
lineStyle: { lineStyle: {
// 使用深浅的间隔色 // 使用深浅的间隔色
color: [_this.DColor ? "#fff" : echartsColor.thread], color: [_this.DColor ? "#fff" : echartsColor.thread],
@@ -1465,7 +1466,7 @@ export default {
//minInterval: 1, //minInterval: 1,
type: "value", type: "value",
axisLine: { axisLine: {
show: true, show: false,
lineStyle: { lineStyle: {
color: _this.DColor ? "#fff" : echartsColor.thread, color: _this.DColor ? "#fff" : echartsColor.thread,
}, },
@@ -1479,6 +1480,7 @@ export default {
}, },
}, },
splitLine: { splitLine: {
show: false,
lineStyle: { lineStyle: {
// 使用深浅的间隔色 // 使用深浅的间隔色
color: [_this.DColor ? "#fff" : echartsColor.thread], color: [_this.DColor ? "#fff" : echartsColor.thread],

View File

@@ -714,6 +714,7 @@ export default {
} }
}, },
splitLine: { splitLine: {
show: false,
lineStyle: { lineStyle: {
// 使用深浅的间隔色 // 使用深浅的间隔色
color: [_this.DColor ? '#fff' : echartsColor.thread], color: [_this.DColor ? '#fff' : echartsColor.thread],
@@ -1079,6 +1080,7 @@ export default {
} }
}, },
splitLine: { splitLine: {
show: false,
lineStyle: { lineStyle: {
// 使用深浅的间隔色 // 使用深浅的间隔色
color: [_this.DColor ? '#fff' : echartsColor.thread], color: [_this.DColor ? '#fff' : echartsColor.thread],

View File

@@ -1,7 +1,7 @@
<!-- 设备管理使用折叠面板渲染多个tree --> <!-- 设备管理使用折叠面板渲染多个tree -->
<template> <template>
<div :style="{ width: menuCollapse ? '40px' : props.width }" <div :style="{ width: menuCollapse ? '40px' : props.width }"
style="display: flex; transition: all 0.3s; overflow: hidden"> style="display: flex; overflow: hidden">
<Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'" <Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse" :class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse"
style="cursor: pointer" /> style="cursor: pointer" />

View File

@@ -1,11 +1,11 @@
<!-- 设备监控使用折叠面板渲染多个tree --> <!-- 设备监控使用折叠面板渲染多个tree -->
<template> <template>
<div :style="{ width: menuCollapse ? '40px' : props.width }" <div :style="{ width: menuCollapse ? '40px' : props.width }"
style="display: flex; transition: all 0.3s; overflow: hidden"> style="display: flex; overflow: hidden">
<Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'" <Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse" style="cursor: pointer" :class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse" style="cursor: pointer"
v-if="route.path != '/admin/govern/reportCore/statistics/index'" /> v-if="route.path != '/admin/govern/reportCore/statistics/index'" />
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }"> <div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1, display: menuCollapse ? 'none' : '' }">
<div style="display: flex; align-items: center" class="mb10"> <div style="display: flex; align-items: center" class="mb10">
<el-input maxlength="32" show-word-limit v-model="filterText" placeholder="请输入内容" clearable> <el-input maxlength="32" show-word-limit v-model="filterText" placeholder="请输入内容" clearable>
<template #prefix> <template #prefix>
@@ -223,7 +223,7 @@ onMounted(() => {
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;
height: 100%; height: 100%;
width: 100%; width: 280px;
background: #fff; background: #fff;
:deep(.el-tree) { :deep(.el-tree) {

View File

@@ -1,27 +1,27 @@
<template> <template>
<div class="nav-bar"> <div class="nav-bar">
<div v-if="config.layout.shrink && config.layout.menuCollapse" class="unfold"> <div v-if="config.layout.shrink && config.layout.menuCollapse" class="unfold">
<Icon <Icon @click="onMenuCollapse" name="fa fa-indent" :color="config.getColorVal('menuActiveColor')"
@click="onMenuCollapse" size="18" />
name="fa fa-indent"
:color="config.getColorVal('menuActiveColor')"
size="18"
/>
</div> </div>
<span class="nav-bar-title">{{ getTheme.name }}</span> <span class="nav-bar-title">{{ getTheme.name }} <span style="font-size: 14px;" v-if="Version?.versionName">
({{ Version?.versionName }})
</span></span>
<NavMenus /> <NavMenus />
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'
import { useConfig } from '@/stores/config' import { useConfig } from '@/stores/config'
import NavTabs from '@/layouts/admin/components/navBar/tabs.vue' import NavTabs from '@/layouts/admin/components/navBar/tabs.vue'
import NavMenus from '../navMenus.vue' import NavMenus from '../navMenus.vue'
import { showShade } from '@/utils/pageShade' import { showShade } from '@/utils/pageShade'
import { onMounted } from 'vue' import { onMounted } from 'vue'
import { getLastData } from '@/api/systerm'
const config = useConfig() const config = useConfig()
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string) const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
const Version: any = ref({})
const onMenuCollapse = () => { const onMenuCollapse = () => {
showShade('ba-aside-menu-shade', () => { showShade('ba-aside-menu-shade', () => {
config.setLayout('menuCollapse', true) config.setLayout('menuCollapse', true)
@@ -29,6 +29,10 @@ const onMenuCollapse = () => {
config.setLayout('menuCollapse', false) config.setLayout('menuCollapse', false)
} }
onMounted(() => { onMounted(() => {
getLastData({ versionType: 'WEB' }).then(res => {
Version.value = res.data
})
document.title = getTheme.name document.title = getTheme.name
}) })
</script> </script>

View File

@@ -24,6 +24,7 @@
size="18" size="18"
/> />
</div> </div>
<el-dropdown style="height: 100%" @command="handleCommand"> <el-dropdown style="height: 100%" @command="handleCommand">
<div class="admin-info" :class="state.currentNavMenu == 'adminInfo' ? 'hover' : ''"> <div class="admin-info" :class="state.currentNavMenu == 'adminInfo' ? 'hover' : ''">
<el-avatar :size="25" fit="fill"> <el-avatar :size="25" fit="fill">
@@ -46,7 +47,8 @@
name="fa fa-cogs" name="fa fa-cogs"
size="18" size="18"
/> />
</div> --> </div> -->"
<Config /> <Config />
<PopupPwd ref="popupPwd" /> <PopupPwd ref="popupPwd" />
<AdminInfo ref="popupAdminInfo" /> <AdminInfo ref="popupAdminInfo" />
@@ -69,6 +71,7 @@ import PopupPwd from './popup/password.vue'
import AdminInfo from './popup/adminInfo.vue' import AdminInfo from './popup/adminInfo.vue'
import { useNavTabs } from '@/stores/navTabs' import { useNavTabs } from '@/stores/navTabs'
const adminInfo = useAdminInfo() const adminInfo = useAdminInfo()
const navTabs = useNavTabs() const navTabs = useNavTabs()
const configStore = useConfig() const configStore = useConfig()

View File

@@ -2,7 +2,7 @@
<div class="default-main device-control" :style="{ height: pageHeight.height }" v-loading="loading" <div class="default-main device-control" :style="{ height: pageHeight.height }" v-loading="loading"
style="position: relative"> style="position: relative">
<!-- @init="nodeClick" --> <!-- @init="nodeClick" -->
<PointTree @node-click="nodeClick" @pointTypeChange="pointTypeChange" style="width: 280px"></PointTree> <PointTree @node-click="nodeClick" @pointTypeChange="pointTypeChange"></PointTree>
<div class="device-control-right" v-if="deviceData"> <div class="device-control-right" v-if="deviceData">
<el-descriptions title="监测点信息" class="mb10" width="180" :column="3" border> <el-descriptions title="监测点信息" class="mb10" width="180" :column="3" border>
<template #extra> <template #extra>
@@ -1253,7 +1253,7 @@ onBeforeUnmount(() => {
display: flex; display: flex;
&-left { &-left {
width: 280px; // width: 280px;
} }
&-right { &-right {

View File

@@ -358,7 +358,7 @@ defineExpose({ open, setRealTrendData, setOverLimitData })
.select { .select {
position: absolute; position: absolute;
top: -40px; top: -36px;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;

View File

@@ -344,6 +344,7 @@ const init = async () => {
color: ['#FFCC00', '#009900', '#CC0000', ...color], color: ['#FFCC00', '#009900', '#CC0000', ...color],
xAxis: { xAxis: {
type: 'time', type: 'time',
name:'时间',
axisLabel: { axisLabel: {
formatter: { formatter: {
day: '{MM}-{dd}', day: '{MM}-{dd}',

View File

@@ -32,6 +32,7 @@ const key: any = ref(0)
const column: any = ref([ const column: any = ref([
{ field: 'startTime', title: '数据起始时间', width: '140px', sortable: true }, { field: 'startTime', title: '数据起始时间', width: '140px', sortable: true },
{ field: 'endTime', title: '数据结束时间', width: '140px', sortable: true }, { field: 'endTime', title: '数据结束时间', width: '140px', sortable: true },
{ field: 'lastTime', title: '持续时间', width: '140px', sortable: true },
{ field: 'itemName', title: '数据来源', width: '100px' }, { field: 'itemName', title: '数据来源', width: '100px' },
{ field: 'statisticalInterval', title: '时间间隔(分钟)', width: '120px', }, { field: 'statisticalInterval', title: '时间间隔(分钟)', width: '120px', },
{ field: 'voltageLevel', title: '电压等级', width: '100px', sortable: true }, { field: 'voltageLevel', title: '电压等级', width: '100px', sortable: true },
@@ -45,7 +46,7 @@ const column: any = ref([
{ field: 'capacitySscb', title: '基准短路容量(MVA)', width: '140px', }, { field: 'capacitySscb', title: '基准短路容量(MVA)', width: '140px', },
{ field: 'capacitySscmin', title: '最小短路容量(MVA)', width: '140px', }, { field: 'capacitySscmin', title: '最小短路容量(MVA)', width: '140px', },
{ field: 'location', title: ' 测试位置', width: '100px', }, // { field: 'location', title: ' 测试位置', width: '100px', },

View File

@@ -34,7 +34,7 @@
<el-descriptions-item label="型号"> <el-descriptions-item label="型号">
{{ echoName(deviceData.devModel, devModelOptions) }} {{ echoName(deviceData.devModel, devModelOptions) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="接入日期"> <el-descriptions-item label="首次接入日期">
{{ deviceData.time }} {{ deviceData.time }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="应用程序版本号"> <el-descriptions-item label="应用程序版本号">

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div :style="{ width: menuCollapse ? '40px' : '280px' }" <div :style="{ width: menuCollapse ? '40px' : '280px' }"
style="transition: all 0.3s; overflow: hidden; height: 100%"> style=" overflow: hidden; height: 100%">
<Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'" <Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse" :class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse"
style="cursor: pointer" /> style="cursor: pointer" />

View File

@@ -35,7 +35,7 @@ const tableStore = new TableStore({
method: 'POST', method: 'POST',
paramsPOST: true, paramsPOST: true,
showPage: false, showPage: false,
publicHeight: 365, publicHeight: 355,
column: [ column: [
// { width: '60', type: 'checkbox', fixed: 'left' }, // { width: '60', type: 'checkbox', fixed: 'left' },
{ {
@@ -160,12 +160,12 @@ const tableStore = new TableStore({
}) })
const setHeight = () => { const setHeight = () => {
if (props.activeColName == '0') { if (props.activeColName == '0') {
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(360, 495) waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(350, 485)
tableStore.table.height = mainHeight(385).height tableStore.table.height = mainHeight(380).height
} else { } else {
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(360, 360) waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(350, 350)
tableStore.table.height = mainHeight(250).height tableStore.table.height = mainHeight(240).height
} }
} }
provide('tableStore', tableStore) provide('tableStore', tableStore)

View File

@@ -215,7 +215,7 @@ const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
const volConTypeList = dictData.getBasicData('Dev_Connect') const volConTypeList = dictData.getBasicData('Dev_Connect')
//值类型 //值类型
const pageHeight = mainHeight(20) const pageHeight = mainHeight(20)
const EcharHeight = ref(mainHeight(451)) const EcharHeight = ref(mainHeight(436))
const loading = ref(false) const loading = ref(false)
const searchForm: any = ref({}) const searchForm: any = ref({})
const typeOptions = [ const typeOptions = [
@@ -955,15 +955,15 @@ const selectChange = (e: boolean) => {
if (activeColName.value == '0') { if (activeColName.value == '0') {
if (flag.value) { if (flag.value) {
EcharHeight.value = mainHeight(495) EcharHeight.value = mainHeight(480)
} else { } else {
EcharHeight.value = mainHeight(451) EcharHeight.value = mainHeight(436)
} }
} else { } else {
if (flag.value) { if (flag.value) {
EcharHeight.value = mainHeight(355) EcharHeight.value = mainHeight(340)
} else { } else {
EcharHeight.value = mainHeight(315) EcharHeight.value = mainHeight(300)
} }
} }
} }
@@ -972,15 +972,15 @@ const handleChange = () => {
if (activeColName.value == '0') { if (activeColName.value == '0') {
if (flag.value) { if (flag.value) {
EcharHeight.value = mainHeight(495) EcharHeight.value = mainHeight(480)
} else { } else {
EcharHeight.value = mainHeight(451) EcharHeight.value = mainHeight(436)
} }
} else { } else {
if (flag.value) { if (flag.value) {
EcharHeight.value = mainHeight(355) EcharHeight.value = mainHeight(340)
} else { } else {
EcharHeight.value = mainHeight(315) EcharHeight.value = mainHeight(300)
} }
} }
setTimeout(() => { setTimeout(() => {
@@ -1051,8 +1051,8 @@ onMounted(() => {
overflow: hidden; overflow: hidden;
flex: 1 !important; flex: 1 !important;
height: calc(100vh - 135px); height: calc(100vh - 135px);
padding: 10px 10px 10px 10px; // padding: 10px 10px 10px 10px;
border: 2px solid #eeeeee; // border: 2px solid #eeeeee;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@@ -38,7 +38,7 @@
:show-file-list="false" :auto-upload="false" :on-change="bulkImport"> :show-file-list="false" :auto-upload="false" :on-change="bulkImport">
<el-button type="primary" class="ml10" icon="el-icon-Tickets">批量导入</el-button> <el-button type="primary" class="ml10" icon="el-icon-Tickets">批量导入</el-button>
</el-upload> </el-upload>
<el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">设备出厂管理</el-button> <el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">新增设备</el-button>
</template> </template>
</TableHeader> </TableHeader>
<Table ref="tableRef"></Table> <Table ref="tableRef"></Table>
@@ -139,7 +139,7 @@ const rules = reactive({
sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }] sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }]
}) })
const dialogFormVisible = ref(false) const dialogFormVisible = ref(false)
const dialogTitle = ref('设备出厂管理') const dialogTitle = ref('新增设备')
const loading = ref<boolean>(false) const loading = ref<boolean>(false)
const devModelOptions: any = ref([]) const devModelOptions: any = ref([])
queryByCode('Device_Type').then(res => { queryByCode('Device_Type').then(res => {
@@ -395,7 +395,7 @@ const tableStore = new TableStore({
// }, // },
//便携式设备手动接入 //便携式设备手动接入
{ {
title: '手动接入', title: '接5入',
type: 'primary', type: 'primary',
icon: 'el-icon-Grid', icon: 'el-icon-Grid',
render: 'basicButton', render: 'basicButton',
@@ -403,7 +403,7 @@ const tableStore = new TableStore({
return ( return (
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' && (row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') || row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') ||
row.status == '5' row.status != '5'
) )
}, },
click: row => { click: row => {
@@ -425,7 +425,7 @@ const tableStore = new TableStore({
} }
}, },
{ {
title: '接入', title: '接3入',
type: 'primary', type: 'primary',
icon: 'el-icon-Grid', icon: 'el-icon-Grid',
render: 'basicButton', render: 'basicButton',
@@ -433,7 +433,7 @@ const tableStore = new TableStore({
return ( return (
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' && (row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') || row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') ||
row.status == '3' row.status != '3'
) )
}, },
click: row => { click: row => {
@@ -591,7 +591,7 @@ const bulkImport = (e: any) => {
// 新增 // 新增
const add = () => { const add = () => {
dialogFormVisible.value = true dialogFormVisible.value = true
dialogTitle.value = '设备出厂管理' dialogTitle.value = '新增设备'
} }
// 确认 // 确认
@@ -601,7 +601,7 @@ const onSubmit = () => {
ruleFormRef.value.validate((valid: any) => { ruleFormRef.value.validate((valid: any) => {
if (valid) { if (valid) {
if (dialogTitle.value == '设备出厂管理') { if (dialogTitle.value == '新增设备') {
addEquipmentDelivery(form).then(res => { addEquipmentDelivery(form).then(res => {
ElMessage.success('新增成功') ElMessage.success('新增成功')
if (devTypeOptions.value.filter((item: any) => item.value == form.devType)[0].code == 'Portable') { if (devTypeOptions.value.filter((item: any) => item.value == form.devType)[0].code == 'Portable') {

View File

@@ -6,7 +6,7 @@
@Policy="stencil"> @Policy="stencil">
</PointTree> </PointTree>
</pane> </pane>
<pane style="background: #fff" :style="height"> <pane :size="(100 - size)" style="background: #fff" :style="height">
<TableHeader ref="TableHeaderRef" datePicker> <TableHeader ref="TableHeaderRef" datePicker>
<template v-slot:select> <template v-slot:select>
<el-form-item label="模板策略"> <el-form-item label="模板策略">
@@ -102,7 +102,7 @@ const flag = ref(true)
onMounted(() => { onMounted(() => {
const dom = document.getElementById('navigation-splitpanes') const dom = document.getElementById('navigation-splitpanes')
if (dom) { if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100) size.value = ((280 / (dom.offsetWidth - 7)) * 100)
} }
}) })

View File

@@ -6,7 +6,7 @@
@Policy="stencil"> @Policy="stencil">
</pointTreeWx> </pointTreeWx>
</pane> </pane>
<pane style="background: #fff" :style="height"> <pane :size="(100-size)" style="background: #fff" :style="height">
<TableHeader ref="TableHeaderRef" :showReset="false"> <TableHeader ref="TableHeaderRef" :showReset="false">
<template v-slot:select> <template v-slot:select>
<el-form-item label="模板策略"> <el-form-item label="模板策略">
@@ -90,7 +90,9 @@ const flag = ref(true)
onMounted(() => { onMounted(() => {
const dom = document.getElementById('navigation-splitpanes') const dom = document.getElementById('navigation-splitpanes')
if (dom) { if (dom) {
size.value = Math.round((210 / dom.offsetHeight) * 100) console.log("🚀 ~ onMounted ~ dom.offsetHeight:", dom.offsetWidth)
size.value = ((280 / (dom.offsetWidth - 7)) * 100)
} }
}) })

View File

@@ -0,0 +1,121 @@
<template>
<div class="default-main">
<TableHeader :showReset="false">
<template #select>
<el-radio-group v-model="tableStore.table.params.versionType" @change="tableStore.index()">
<el-radio-button label="web" value="WEB" />
<el-radio-button label="app" value="APP" />
</el-radio-group>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus" @click="addMenu">新增版本</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<el-dialog width="600px" v-model="dialogVisible" title="新增版本">
<el-form :inline="false" :model="form" label-width="auto" class="form-one">
<el-form-item label="版本号">
<el-input maxlength="32" show-word-limit v-model="form.appVersion" placeholder="请输入版本号" />
</el-form-item>
<el-form-item label="整改内容">
<el-input maxlength="300" type="textarea" show-word-limit v-model="form.content"
placeholder="请输入整改内容" />
</el-form-item>
<el-form-item label="发布类型">
<el-select v-model="form.sev" placeholder="请选择发布类型">
<el-option label="优化" :value="0" />
<el-option label="bug调整" :value="1" />
</el-select>
</el-form-item>
<el-form-item label="版本类型">
<el-select v-model="form.versionType" placeholder="please select your zone">
<el-option label="web" value="WEB" />
<el-option label="app" value="APP" />
</el-select>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submit">确认</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import { ElMessage } from 'element-plus'
import { addVersion } from '@/api/systerm'
import router from '@/router/index'
const dialogVisible = ref(false)
const form = ref({
appVersion: '',
content: '',
versionType: '',
sev: '',
})
const tableStore = new TableStore({
url: '/cs-system-boot/appVersion/getAllData',
method: 'POST',
showPage: false,
paramsPOST: true,
column: [
{
title: '序号', width: 80, formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '创建时间', field: 'createTime', width: '220' },
{ title: '整改内容', field: 'content' },
{
title: '发布类型', field: 'sev', formatter: (row,) => {
return row.cellValue == 0 ? '优化' : 'bug调整'
},
width: '150'
},
{ title: '版本号', field: 'versionName', width: '150' },
],
})
tableStore.table.params.versionType = 'WEB'
provide('tableStore', tableStore)
onMounted(async () => {
tableStore.index()
// await queryByCode('Direct_Connected_Device').then((res) => {
// queryByid(res.data.id).then((res) => {
// DevTypeOptions.value = res.data
// })
// })
// tableStore.table.params.devType = ''
})
const submit = () => {
addVersion(form.value).then(res => {
ElMessage.success('新增成功')
tableStore.index()
dialogVisible.value = false
router.go(0)
})
}
const addMenu = () => {
dialogVisible.value = true
form.value.appVersion =tableStore.table.data[0].versionName|| ''
form.value.content = ''
form.value.sev = tableStore.table.data[0].sev ||0
form.value.versionType = tableStore.table.data[0].versionType || 'WEB'
}
</script>

View File

@@ -97,7 +97,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, inject } from 'vue' import { ref, inject } from 'vue'
import { reactive } from 'vue' import { reactive } from 'vue'
import router from '@/router/index'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
const dialogVisible = ref(false) const dialogVisible = ref(false)
const title = ref('') const title = ref('')
@@ -203,6 +203,7 @@ const onSubmit = () => {
addTheme(form).then(res => { addTheme(form).then(res => {
ElMessage.success('新增成功') ElMessage.success('新增成功')
Cancel() Cancel()
}) })
} }
if (title.value == '修改主题') { if (title.value == '修改主题') {
@@ -214,8 +215,12 @@ const onSubmit = () => {
} }
// 取消 // 取消
const Cancel = () => { const Cancel = () => {
// dialogVisible.value = false // dialogVisible.value = false
emit('Cancels') emit('Cancels')
setTimeout(() => {
router.go(0)
}, 500);
} }
/** /**
* 选择图片上传 * 选择图片上传