+
-
@@ -411,122 +411,7 @@ export default {
this.totalSize = size
},
async upload_over() {
- // //左侧内容上传结束
- // if (!this.upload_flag) {
- // return
- // }
- // this.upload_flag = false
- // if (this.flag_cont_up) {
- // //如果是点击按钮开启的上传,则进行上传右侧
- // if ((!this.isNew && this.fileData) || (this.isNew && this.fileLists[0])) {
- // //开启了标签则检测并上传
- // let files_n_incr = 1
- // let data1 = new FormData()
- // if (this.isNew) {
- // if (this.fileLists[0]) {
- // data1.append(`file${files_n_incr}`, this.fileLists[0]) //标签cs文件
- // files_n_incr++
- // } else {
- // this.$message({
- // offset: 100,
- // message: this.$t('work.pleaseUploadTag'),
- // type: 'warning'
- // })
- // return
- // }
- // } else {
- // if (this.fileData && !this.fileLists[0]) {
- // //纯打开,需要上传的是as文件
- // let _file = new File([JSON.stringify(this.fileData)], this.saveWorkList.taskName, { type: 'text/plain' })
- // data1.append(`file${files_n_incr}`, _file) //标签cs文件
- // files_n_incr++
- // } else if (this.fileData && this.fileLists[0]) {
- // //打开后,又重新选择了soon文件
- // data1.append(`file${files_n_incr}`, this.fileLists[0]) //标签cs文件
- // files_n_incr++
- // } else {
- // this.$message({
- // offset: 100,
- // message: this.$t('work.pleaseUploadTag'),
- // type: 'warning'
- // })
- // return
- // }
- // }
- // if (this.$refs.refFile2.files.length != 0) {
- // // 有csv合并文件
- // data1.append(`file${files_n_incr}`, this.$refs.refFile2.files[0]) //csv文件
- // data1.append(`csv`, true) //csv文件flag
- // //console.log(this.$refs.refFile2.files);
- // files_n_incr++
- // } else {
- // data1.append(`csv`, false) //csv文件flag
- // }
- // for (let item of this.soonList) {
- // if (item.type == 1 && this.$refs[item.origin_name].files[0] != undefined && this.$refs.refFile2.files.length != 0) {
- // //有合并文件
- // //data1.append(item.origin_name, this.$refs[item.origin_name].files[0]);//图片文件
- // data1.append(`file${files_n_incr}`, this.$refs[item.origin_name].files[0]) //图片文件
- // files_n_incr++
- // } else if (item.type == 1 && this.$refs[item.origin_name].files[0] != undefined && this.$refs.refFile2.files.length == 0) {
- // //无合并文件
- // data1.append(item.origin_name, this.$refs[item.origin_name].files[0]) //图片文件
- // //data1.append(`file${files_n_incr}`, this.$refs[item.origin_name].files[0]);//图片文件
- // files_n_incr++
- // } else if ((item.type == 3 || item.type == 5) && this.$refs.refFile2.files.length == 0) {
- // //无合并文件
- // let data = this.form[item.origin_name]
- // if (data == '' || data == undefined || data == null) {
- // data = item.default
- // }
- // data1.append(item.origin_name, data) //合成文字与条形码 有默认值的
- // } else if (item.type == 4 && this.$refs.refFile2.files.length == 0) {
- // //二维码
- // data1.append(item.origin_name, this.form[item.origin_name])
- // }
- // }
- // this.$message({ offset: 100, message: this.$t('work.uploadingTag') })
- // let pathName
- // if (this.high_setting_form.localfiles) {
- // //打开本地选项
- // let rootFile = this.$refs.uploader.uploader.getRoot()
- // if (rootFile.fileList.length != 1) {
- // this.$message({
- // offset: 100,
- // message: this.$t('work.oneFolder'),
- // type: 'warning'
- // })
- // return
- // }
- // let filePath = rootFile.fileList[0]
- // if (!filePath.isFolder) {
- // this.$message({
- // offset: 100,
- // message: this.$t('work.notFolder'),
- // type: 'warning'
- // })
- // return
- // }
- // pathName = filePath.name
- // } else {
- // pathName = this.upload_disk
- // }
- // this.$axios({
- // method: 'post',
- // url: '/upload/' + pathName,
- // headers: {
- // 'Content-Type': 'multipart/form-data;boundary=' + new Date().getTime()
- // },
- // data: data1
- // }).then((res) => {
- // this.submit() //调用提交函数
- // })
- // } else {
- // //未开启标签则直接提交
- // this.submit()
- // }
- // }
- // this.flag_cont_up = false
+
},
// 保存
workSave() {
@@ -634,8 +519,11 @@ export default {
this.form.ass_task.push(task)
}
that.submitLoading = true
- that.testForm.req_info = that.form
- console.log(that.form, that.testForm)
+ if (that.form.json_file) that.form.has_print_task = true
+ if (fileList.length) that.form.has_copy_task = true
+ let theForm = {...that.form}
+ if (!theForm.udf_file) delete theForm.udf_file
+ that.testForm.req_info = theForm
that.$store.dispatch('chat/websocketsend', that.testForm)
setTimeout(() => {
that.$message({
diff --git a/src/renderer/store/modules/chat.js b/src/renderer/store/modules/chat.js
index 6805754..8717af5 100644
--- a/src/renderer/store/modules/chat.js
+++ b/src/renderer/store/modules/chat.js
@@ -242,7 +242,7 @@ const actions = {
}
let types = CDTypes
let typeLists = cd_types
- if (isBD) {
+ if (!isBD) {
types = {}
for(let key in CDTypes) {
if (parseInt(key) < 4) types[key] = CDTypes[key]
diff --git a/src/renderer/views/dashboard/index.vue b/src/renderer/views/dashboard/index.vue
index 94197ee..9fa8eb7 100644
--- a/src/renderer/views/dashboard/index.vue
+++ b/src/renderer/views/dashboard/index.vue
@@ -38,7 +38,7 @@
-
+
@@ -375,7 +375,7 @@ export default {
},
'$store.state.chat.printer_info': {
handler(val) {
- if (!val.cover_flag) {
+ if (val.cover_flag) {
this.runText = '设备门盖被打开,请关闭门盖。'
} else {
this.runText = this.$store.state.chat.PrinterStatus[val.printer_status]
@@ -722,6 +722,14 @@ $red: #ff0000;
color: $yellow;
}
}
+ .device_statustrue {
+ .device_status_dot {
+ background-color: $red;
+ }
+ .device_status_text {
+ color: $red;
+ }
+ }
.device_run {
width: 100%;
height: 44px;