激活设备
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
// Install `electron-debug` with `devtron`
|
// Install `electron-debug` with `devtron`
|
||||||
require('electron-debug')({ showDevTools: true })
|
require('electron-debug')({ showDevTools: false })
|
||||||
|
|
||||||
// Install `vue-devtools`
|
// Install `vue-devtools`
|
||||||
require('electron').app.on('ready', () => {
|
require('electron').app.on('ready', () => {
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ const defaultData = {
|
|||||||
system_name: '', //主机名称
|
system_name: '', //主机名称
|
||||||
is_set_cddev: 0,
|
is_set_cddev: 0,
|
||||||
serial_no: '', //设备序列号
|
serial_no: '', //设备序列号
|
||||||
|
test_use: '', //试用天数
|
||||||
// 左右光盘桶
|
// 左右光盘桶
|
||||||
strong_list: [
|
strong_list: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,14 @@
|
|||||||
<div class="top_left_line"></div>
|
<div class="top_left_line"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex_box">
|
<div class="flex_box">
|
||||||
<div v-if="printer_info.test_use" class="top_tip">试用版 {{printer_info.test_use}}天</div>
|
<template v-if="printer_info.test_use || printer_info.test_use === 0">
|
||||||
|
<div v-if="printer_info.test_use && printer_info.test_use === '0xFF'" class="top_tip"></div>
|
||||||
|
<template v-else-if="printer_info.test_use > -1">
|
||||||
|
<div class="top_tip">试用版 {{printer_info.test_use}}天</div>
|
||||||
|
<el-button @click="handleActive" type="text" class="top_tip_btn">前往激活</el-button>
|
||||||
|
</template>
|
||||||
|
<div v-else-if="printer_info.test_use == -1" class="top_tip1">正在验证注册信息</div>
|
||||||
|
</template>
|
||||||
<user-info></user-info>
|
<user-info></user-info>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -333,6 +340,7 @@ import UserInfo from '@/components/userInfo/userInfo.vue'
|
|||||||
import WorkAdd from '@/components/workAdd/workAdd.vue'
|
import WorkAdd from '@/components/workAdd/workAdd.vue'
|
||||||
const exePath = !app.isPackaged ? process.cwd() : path.dirname(process.execPath)
|
const exePath = !app.isPackaged ? process.cwd() : path.dirname(process.execPath)
|
||||||
const shPath = path.join(exePath, 'CardsoonServer', 'control.sh')
|
const shPath = path.join(exePath, 'CardsoonServer', 'control.sh')
|
||||||
|
const activePath = path.join(exePath, 'CardsoonServer', 'regist.sh')
|
||||||
export default {
|
export default {
|
||||||
name: 'dashboard',
|
name: 'dashboard',
|
||||||
components: { UserInfo, WorkAdd },
|
components: { UserInfo, WorkAdd },
|
||||||
@@ -726,6 +734,31 @@ export default {
|
|||||||
that.serviceLoading = false
|
that.serviceLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 激活设备
|
||||||
|
handleActive() {
|
||||||
|
let that = this
|
||||||
|
that
|
||||||
|
.$prompt('请输入管理员密码并点击确定以前往激活设备', '温馨提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
inputType: 'password'
|
||||||
|
})
|
||||||
|
.then(({ value }) => {
|
||||||
|
that
|
||||||
|
.$runCmd(`bash ${activePath} ${value}`)
|
||||||
|
.then((res) => {
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
that.$message({
|
||||||
|
message: err,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
// 执行
|
// 执行
|
||||||
handleRun() {
|
handleRun() {
|
||||||
if (!that.workStatus) {
|
if (!that.workStatus) {
|
||||||
@@ -1209,6 +1242,15 @@ $red: #ff0000;
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
.top_tip1 {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #279fd0;
|
||||||
|
}
|
||||||
|
.top_tip_btn {
|
||||||
|
font-size: 14px;
|
||||||
|
text-decoration: underline;
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.content_body {
|
.content_body {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
|
|||||||
Reference in New Issue
Block a user