首页 > 其他分享 >ssts-hospital-web-master项目实战记录七:项目迁移-主页及其组成

ssts-hospital-web-master项目实战记录七:项目迁移-主页及其组成

时间:2024-02-22 22:55:44浏览次数:24  
标签:web vue views ssts hospital html master import main

记录时间:2024-02-22

1.主页及其组成

(1)index.html -> App.vue
(2)MainPage*.html -> views/main-page/main-page*.vue
MainPage1.html -> views/main-page/main-page1.vue
MainPage2.html -> views/main-page/main-page2.vue
MainPage3.html -> views/main-page/main-page3.vue

...
(3)MasterFrame
Master_Basic.html -> views/master/master-basic.vue
Master_GYSRMYY.html -> views/master/master-gysrmyy.vue

...
(4)DeviceControl
EzwareControl.html -> views/device-control/ezware-control.vue
...
(5)DataDict
DataDict.html -> views/data-dict/data-dict.vue
(6)Monitor
Monitor.html -> views/monitor/monitor.vue
(7)Camera
Camera1.html -> views/camera/camera1.vue
Camera2.html -> views/camera/camera2.vue

...

 

一、html文件目录结构(VS2015)

  

 二、vue文件目录结构(VS Code)

 

三、vue文件初始代码

App.vue

<script setup lang="ts"> import { defineComponent, ref, computed } from 'vue' import MainPage1 from '@/views/main-page/main-page1.vue' import MainPage2 from '@/views/main-page/main-page2.vue' import MainPage3 from '@/views/main-page/main-page3.vue'
const mainpage = ref('MainPage1.html')
const currentComponent = computed(() => {   switch (mainpage.value) {     case 'MainPage1.html':       return MainPage1     case 'MainPage2.html':       return MainPage2     case 'MainPage3.html':       return MainPage3     default:       return MainPage1   } })
defineComponent({   name: 'App',   components: {     MainPage1,     MainPage2,     MainPage3   } }) </script>
<template>   <div>     <component :is="currentComponent" />   </div> </template>
<style scoped></style>

 

main-page1.vue

<script setup lang="ts"> import { defineComponent } from 'vue' import Master from '@/views/master/master-basic.vue' import DeviceControl from '@/views/device-control/ezware-control.vue' import DataDict from '@/views/data-dict/data-dict.vue' import Monitor from '@/views/monitor/monitor.vue' import Camera1 from '@/views/camera/camera1.vue' import Camera2 from '@/views/camera/camera2.vue'
const components = [Master, DeviceControl, DataDict, Monitor, Camera1, Camera2]
defineComponent({   name: 'MainPage1',   registedComponents: {     ...components   } }) </script>
<template>   <div>     <title>主页1</title>     <component       v-for="(component, index) in components"       :key="index"       :is="component"     />   </div> </template>
<style scoped></style>

 

master-basic.vue

<script setup lang="ts"></script>
<template>   <div>     <title>母版页</title>   </div> </template>
<style scoped></style>   ezware-control.vue <script setup lang="ts"></script>
<template>   <div>     <title>设备驱动</title>   </div> </template>
<style scoped></style>   data-dict.vue <script setup lang="ts"></script>
<template>   <div>     <title>数据字典</title>   </div> </template>
<style scoped></style>   monitor.vue <script setup lang="ts"></script>
<template>   <div>     <title>网络监控</title>   </div> </template>
<style scoped></style>   camera1.vue <script setup lang="ts"></script>
<template>   <div>     <title>监控摄像头1</title>   </div> </template>
<style scoped></style>   camera2.vue <script setup lang="ts"></script>
<template>   <div>     <title>监控摄像头1</title>   </div> </template>
<style scoped></style>  

四、运行测试

npm run dev

 



翻译

搜索

复制

<iframe></iframe>

标签:web,vue,views,ssts,hospital,html,master,import,main
From: https://www.cnblogs.com/lizhigang/p/18028387

相关文章

  • 简单了解HTTP、Websocket和Netty
    前言伴随着网络的快速发展,网络通讯越来越重要,通讯的快捷、安全、方便影响着用户的体验。本文将探讨这些技术的原理、特点以及在实际应用中的应用场景。1.HTTTP(超文本传输协议)HTTP是一种传输超文本的协议,它是现代互联网通信的基础。其特点包括:简单性:HTTP使用简单的请求-响应模......
  • Web应用_6. Vue3
    title:(在线学习平台)link:(https://www.acwing.com/)cover:(https://cdn.acwing.com/media/activity/surface/log.png)Vue官网1配置环境1.1终端Linux和Mac上可以用自带的终端。Windows上推荐用powershell或者cmd。GitBash有些指令不兼容。1.2安装Nodejs安装地址1......
  • C# 采用HttpWebRequest 、WebClient和HttpClient下载https的文件异常问题
    今天有个客户反应,程序下载文件失败,无法正常使用。远程客户电脑后,查看错误日志,都是提示https:****************************.dll等一系列文件的下载错误提示提示基础连接已经关闭:发送时发生错误。在网上找了很多方案都没有能解决,大多都是https链接时增加指定协议,很遗憾未能解......
  • Cesium之Webpack配置指南
    源码:https://gitee.com/chenxiangzhi/cesium_webpack1.获取Token注册Cesium账号,点击AccessTokensTab并复制默认token2.安装依赖包npminitnpminstallcesiumnpminstall--save-devwebpackwebpack-clinpminstall--save-devstyle-loadercss-loader#处......
  • 在WPF中使用本地Webview2,不依赖系统runtime
    在WPF中使用本地Webview2,不依赖系统runtime项目运行环境:.netframework4.5.2Windows7x64ServicePack1WebView2Microsoft.WebView2.FixedVersionRuntime.120.0.2210.91.x64考虑到很多老项目,本项目使用的是.netframework4.5.2,.Net更高版本的其实也是可以支持的。......
  • Python Web 开源框架排行榜
    截止到2024年2月22日,对GithubStar>900的PythonWeb开源框架,按照Star数量,从高到低排序,具体排名如下:1.DjangoDjangoisahigh-levelPythonwebframeworkthatencouragesrapiddevelopmentandclean,pragmaticdesign.About: TheWebframeworkforperfec......
  • ssts-hospital-web-master项目实战记录六:项目迁移方案大纲(html -> vue)
    记录时间:2024-02-21(一)公共资源部分Inc/cssInc/flashInc/imagesInc/jsInc/voice(二)页面部分1.主页及其组成(1)index.html->App.vue(2)MainPage*.html->views/main-page*MainPage1.html->views/main-page1MainPage2.html->views/main-page2MainPage3.html->......
  • weblogic CVE-2024-20931分析
    weblogic12.2.1.4.0安装我的环境:ubuntu22.04+weblogic12.2.1.4.0+jdk8(注:weblogic不支持OpenJDK)jdk下载安装:https://www.oracle.com/cn/java/technologies/downloads/archive/weblogic下载安装:https://www.oracle.com/middleware/technologies/weblogic-server-install......
  • 推荐一款好用的Web 画布编辑器
    Polotno是一款现代而强大的Web画布编辑器,旨在为用户提供直观、灵活且可定制的图形设计和编辑工具。无论您是专业设计师、开发者,还是初学者,Polotno提供了丰富的功能和用户友好的界面,使您能够轻松创建各种图形内容。这篇我们来介绍kooboo中的Polotnoweb设计器. 主要特点:(1......
  • Weblogic XMLDecoder反序列化漏洞(CVE-2017-10271)复现
    0x00漏洞简介OracleFusionMiddleware(Oracle融合中间件)是美国甲骨文(Oracle)公司的一套面向企业和云环境的业务创新平台。该平台提供了中间件、软件集合等功能。OracleWebLogicServer是其中的一个适用于云环境和传统环境的应用服务器组件。OracleFusionMiddleware中的Oracle......