123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- <template>
- <div class='top_top'>
- <el-row class="top_page_css ttop_height">
- <el-col :span="12" style="padding-left: 10px; padding-top: 10px;">
- <div> </div>
- <!-- <div style="display: flex">
- <img width="23px" height="20px" src="../assets/logo_icon.png" />
- <span
- class="top-font"
- :class="$root.topPageFlag ? 'top-font_black' : 'top-font'"
- > 自助式心理健康评估与认知行为干预系统</span
- >
- </div> -->
- </el-col>
- <el-col :span="12" style="text-align: right; margin-top: 10px">
- <img
- class="top-menu dragNo"
- width="15px"
- height="15px"
- @click="versionFlag = true"
- :src="
- $root.topPageFlag
- ? require('../assets/about.png')
- : require('../assets/about1.png')
- "
- />
- <!-- <el-popover
- placement="bottom"
- title=""
- width="200"
- trigger="click"
- content="心理效能增强系统1.1.1"
- >
- <img
- slot="reference"
- class="top-menu dragNo"
- width="15px"
- height="15px"
- :src="$root.topPageFlag?require('../assets/about.png'):require('../assets/about1.png')"
- />
- </el-popover> -->
- <!--
- <img
- id="topPageHelp"
- class="top-menu dragNo"
- width="15px"
- height="15px"
- :src="
- $root.topPageFlag
- ? require('../assets/help.png')
- : require('../assets/help1.png')
- "
- /> -->
-
- <img
- id="min"
- class="top-menu dragNo"
- @click="narrow()"
- width="15px"
- height="15px"
- :src="
- $root.topPageFlag
- ? require('../assets/jian.png')
- : require('../assets/jian1.png')
- "
- />
- <img
- class="top-menu dragNo"
- width="15px"
- @click="amplification()"
- height="15px"
- :src="
- $root.topPageFlag
- ? require('../assets/fang.png')
- : require('../assets/fang1.png')
- "
- />
- <img
- class="top-menu dragNo"
- width="15px"
- @click="closeWin()"
- height="15px"
- :src="
- $root.topPageFlag
- ? require('../assets/close.png')
- : require('../assets/close1.png')
- "
- />
- </el-col>
- </el-row>
- <el-dialog title="" :visible.sync="versionFlag" width="60%" center>
- <el-row>
- <el-col :span="6" style="text-align: center">
- <img width="23px" height="20px" src="../assets/logo_icon.png" />
- <p>自助式心理健康评估与认知行为干预系统</p>
- </el-col>
- <el-col :span="18">
- <h4>关于自助式心理健康评估与认知行为干预系统</h4>
- <p>版权所有©{{ year }}北京决明科技有限公司</p>
- <p>
- 本软件产品仅限于个人用户基于个人目的使用,禁止将本软件用于生产、经营等商业用途或者其它用途。
- </p>
- <p>
- 警告:
- 本计算机程序受著作权法和国际公约的保护,未经授权擅自复制或传播本程序的部分或全部,
- 可能受到严厉的民事及刑事制裁,并将在法律许可的范围内受到最大可能的起诉.
- </p>
- <p><span>Version:</span> 1.1.8</p>
- <p><span>Build:</span>#880f93eb23</p>
- <p><span>Build on:</span>2023/10/27</p>
- <p><span>Windows:</span>{{ windowsVersion }}</p>
- </el-col>
- </el-row>
- <!-- <span slot="footer" class="dialog-footer">
- <el-button @click="centerDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="centerDialogVisible = false"
- >确 定</el-button
- >
- </span> -->
- </el-dialog>
- </div>
- </template>
- <script>
- let ipcRenderer = require("electron").ipcRenderer;
- const { shell } = require("electron");
- var os = require("os");
- export default {
- name: "TopPage",
- data() {
- return {
- serveBaseUrl: "",
- versionFlag: false,
- year: "",
- windowsVersion: "",
- };
- },
- mounted() {
- // console.log(os.release())
- // parseFloat(os.release()) ;
- let versionLin = os.release();
- let list = versionLin.split(".");
- if (parseInt(list[0]) == 10) {
- if (list.length == 3) {
- if (parseInt(list[2]) > 22000) {
- this.windowsVersion = "11";
- } else {
- this.windowsVersion = "10";
- }
- } else {
- this.windowsVersion = "10";
- }
- } else if (parseInt(list[0]) == 6) {
- if (parseInt(list[1]) == 3) {
- this.windowsVersion = "8.1";
- } else if (parseInt(list[1]) == 2) {
- this.windowsVersion = "8";
- } else if (parseInt(list[1]) == 1) {
- this.windowsVersion = "7";
- } else {
- this.windowsVersion = "";
- }
- } else if (parseInt(list[0]) == 5) {
- this.windowsVersion = "XP";
- }
- // if (list.length == 3) {
- // if (list[2] > 22000) {
- // this.windowsVersion = "11";
- // } else {
- // this.windowsVersion = "10";
- // }
- // } else {
- // if (list[0] == 5) {
- // this.windowsVersion = "XP";
- // } else if (list[0] == 6) {
- // }
- // }
- // console.log(versionLin > 10);
- // if (versionLin > 10) {
- // this.windowsVersion = "10";
- // }
- //release()
- ipcRenderer.send("asynchronoushrv-controlpanel", 1);
- // sessionStorage.setItem('1111','1234567')
- this.getYearFun();
- ipcRenderer.on("send-message-control", (event, arg) => {
- //调用方法进行配置
- this.serveBaseUrl = arg;
- // sessionStorage.setItem("num", that.account);
- sessionStorage.setItem('urlNews',arg)
- // console.log("我得到数据了拉阿拉啦啦啦啦啦");
- // console.log(arg);
- });
- const links = document.getElementById("topPageHelp");
- links.addEventListener("click", (e) => {
- const url = links.getAttribute("href");
- e.preventDefault();
- //\\resources\\exe\\HelpCenter\\help.html
- shell.openExternal(
- this.serveBaseUrl + "\\resources\\exe\\HelpCenter\\help.html"
- );
- //shell.openExternal(this.serveBaseUrl + "\\resources\\exe\\HelpCenter\\help.html");
- //shell.openExternal(this.serveBaseUrl + "\\exe\\HelpCenter\\zb使用说明书.pdf");
- });
- },
- methods: {
- getYearFun() {
- let date = new Date();
- this.year = date.getFullYear();
- },
- narrow() {
- ipcRenderer.send("window-min");
- },
- amplification() {
- ipcRenderer.send("window-max");
- },
- closeWin() {
- ipcRenderer.send("window-close");
- },
- },
- };
- </script>
- <style>
- .top_page_css {
- -webkit-app-region: drag;
- }
- .top-font {
- color: #ffffff;
- line-height: 20px;
- font-size: 16px;
- font-weight: 500;
- }
- .top-font_black {
- color: #000000;
- line-height: 20px;
- font-size: 16px;
- font-weight: 500;
- }
- .top-menu {
- cursor: pointer;
- }
- .dragNo {
- -webkit-app-region: no-drag;
- }
- .ttop_height {
- height: 5vh;
- }
- .top_top{
- position: absolute;
- width:100%;
- margin-left:auto;
- z-index: 3000;
- }
- </style>
|