diff --git a/src/renderer/components/workAdd/workAdd.vue b/src/renderer/components/workAdd/workAdd.vue
index 8b0773a..476c88d 100644
--- a/src/renderer/components/workAdd/workAdd.vue
+++ b/src/renderer/components/workAdd/workAdd.vue
@@ -148,7 +148,9 @@
-
···
+
+ ···
+
新建标签
@@ -211,8 +213,7 @@ const dayjs = require('dayjs')
import fileEmpty from './files/fileEmpty'
import files from './files/file'
-const exePath = path.dirname(process.execPath)
-// const exePath = process.cwd();
+const exePath = !app.isPackaged ? process.cwd() : path.dirname(process.execPath)
export default {
name: 'UserInfo',
components: { fileEmpty, files },
@@ -742,20 +743,14 @@ export default {
// 选择模板
changeTemplate(e) {
let that = this
- const absolutePath = path.resolve(e)
- fs.realpath(absolutePath, (err, fullPath) => {
- if (err) {
- console.error(err)
- return
- }
- that.form.json_file = fullPath
- })
- fs.readFile(e, 'utf8', (err, data) => {
+ const fullPath = path.join(exePath, e)
+ that.form.json_file = fullPath
+ fs.readFile(fullPath, 'utf8', (err, data) => {
if (err) {
console.error('读取文件时出错:', err)
return
}
- let name = e.split('\\')[1]
+ let name = path.basename(fullPath)
that.fileLists[0] = new File([data], name, {
type: ''
})
diff --git a/src/renderer/views/dashboard/index.vue b/src/renderer/views/dashboard/index.vue
index 962897c..a489c69 100644
--- a/src/renderer/views/dashboard/index.vue
+++ b/src/renderer/views/dashboard/index.vue
@@ -327,8 +327,7 @@ import { mapGetters } from 'vuex'
const { app, dialog } = require('@electron/remote')
import UserInfo from '@/components/userInfo/userInfo.vue'
import WorkAdd from '@/components/workAdd/workAdd.vue'
-const exePath = path.dirname(process.execPath)
-// const exePath = process.cwd();
+const exePath = !app.isPackaged ? process.cwd() : path.dirname(process.execPath)
const shPath = path.join(exePath, 'CardsoonServer', 'control.sh')
export default {
name: 'dashboard',
@@ -422,7 +421,6 @@ export default {
watch: {
'$store.state.user.oneLogin': {
handler(val) {
- console.log(val, 'oneLoginoneLoginoneLogin')
if (val) {
this.$store.dispatch('setDatas', { name: 'oneLogin', data: false })
this.startService()
@@ -512,7 +510,6 @@ export default {
},
'$store.state.chat.isConnect': {
handler(val) {
- console.log(val, 'isConnect')
if (val) {
this.$message({
message: '服务已连接',
diff --git a/src/renderer/views/manage/index.vue b/src/renderer/views/manage/index.vue
index 9c9c035..5b36b80 100644
--- a/src/renderer/views/manage/index.vue
+++ b/src/renderer/views/manage/index.vue
@@ -244,7 +244,7 @@ export default {
case 1:
// 校准设备
that
- .$confirm('确定执行校准设备操作吗?', '温馨提示', {
+ .$confirm('请在打印机托盘放入一张光盘,点击确定后将自动校准打印机', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -269,7 +269,7 @@ export default {
case 2:
// 校准上光驱
that
- .$confirm('确定执行校准上光驱操作吗?', '温馨提示', {
+ .$confirm('请在上光驱放入一张光盘,点击确定后将自动校准上光驱', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -294,7 +294,7 @@ export default {
case 3:
// 校准下光驱
that
- .$confirm('确定执行校准下光驱操作吗?', '温馨提示', {
+ .$confirm('请在下光驱放入一张光盘,点击确定后将自动校准下光驱', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -319,7 +319,7 @@ export default {
case 4:
// 校准盘仓
that
- .$confirm('确定执行校准盘仓操作吗?', '温馨提示', {
+ .$confirm('请在左右进盘仓各放入一张光盘,点击确定后将自动校准盘仓', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -360,7 +360,7 @@ export default {
case 2:
// 自动设置光驱
that
- .$confirm('确定执行自动设置光驱操作吗?', '温馨提示', {
+ .$confirm('请再左右盘仓至少放入一张光盘,点击确认后将自动设置上下光驱,如果自动设置失败请手动设置光驱', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -389,7 +389,7 @@ export default {
case 1:
// 重启设备
that
- .$confirm('确定执行重启设备操作吗?', '温馨提示', {
+ .$confirm('点击确定将执行重启设备操作', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -412,7 +412,7 @@ export default {
case 2:
// 清除错误
that
- .$confirm('确定执行清除错误操作吗?', '温馨提示', {
+ .$confirm('点击确定将执行清除错误操作', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -435,7 +435,7 @@ export default {
case 3:
// 进入运输模式
that
- .$confirm('请确保已经取掉左右光盘仓托架,再点击确定', '温馨提示', {
+ .$confirm('请确保已经取掉左右光盘仓托架,点击确定后设备将进入运输模式', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'