修改打包报错问题

This commit is contained in:
guanj
2025-10-21 10:21:15 +08:00
parent 4bd192dabc
commit f252422f65
63 changed files with 6694 additions and 3992 deletions

View File

@@ -19,9 +19,13 @@
:min="0"
:step="1"
step-strictly
style="width: 100%"
/>
</el-form-item>
<el-form-item label="绑定页面">
<el-select v-model="form.pagePath" filterable placeholder="请选择绑定页面" style="width: 100%" clearable>
<el-option v-for="item in pageList" :key="item.path" :label="item.name" :value="item.path" />
</el-select>
</el-form-item>
<el-form-item label="备注" class="top">
<el-input
@@ -131,14 +135,17 @@ import { Tools, CloseBold } from '@element-plus/icons-vue'
import { addDashboard, updateDashboard, queryById } from '@/api/system-boot/csstatisticalset'
import html2canvas from 'html2canvas'
import { useRoute } from 'vue-router'
// defineOptions({
// name: 'cockpit/popup'
// })
const { go } = useRouter()
const { query } = useRoute()
const router = useRouter()
const height = mainHeight(108)
const indicatorHeight = mainHeight(128)
const rowHeight = ref(0)
const pageList: any = ref([])
const GridHeight = ref(0)
const position = ref<CollapseIconPositionType>('left')
const form: any = reactive({
@@ -147,6 +154,8 @@ const form: any = reactive({
containerConfig: [],
sort: '100',
id: '',
pagePath: '',
pathName: '',
remark: ''
})
const activeNames = ref([])
@@ -171,6 +180,13 @@ const layout: any = ref([
const treeComponents: any = ref([]) //组件树
const treeComponentsCopy: any = ref([]) //组件树
const info = () => {
pageList.value = router
.getRoutes()
.filter(item => item?.meta?.component == '/src/views/pqs/cockpit/homePage/index.vue')
.map(item => {
return { name: item?.meta?.title, path: item?.meta?.path }
})
activeNames.value = []
activeNames1.value = []
componentTree().then(res => {
@@ -188,6 +204,8 @@ const info = () => {
queryById({ id: query.id }).then(res => {
layout.value = JSON.parse(res.data.containerConfig)
form.pageName = res.data.pageName
form.pagePath = res.data.pagePath
form.pathName = res.data.pathName
form.sort = res.data.sort
form.remark = res.data.remark
form.id = res.data.id
@@ -343,6 +361,8 @@ const onSubmit = () => {
}).then(canvas => {
url = canvas.toDataURL('image/png')
})
form.pagePath = form.pagePath || ''
form.pathName = pageList.value.filter((item: any) => item.path == form.pagePath)?.[0]?.name || ''
if (valid) {
if (form.id == '') {