diff --git a/src/renderer/assets/images/logo.png b/src/renderer/assets/images/logo.png
index 137311d..2a9a755 100644
Binary files a/src/renderer/assets/images/logo.png and b/src/renderer/assets/images/logo.png differ
diff --git a/src/renderer/components/workAdd/files/file-back.vue b/src/renderer/components/workAdd/files/file-back.vue
index e742789..acee0f6 100644
--- a/src/renderer/components/workAdd/files/file-back.vue
+++ b/src/renderer/components/workAdd/files/file-back.vue
@@ -3,11 +3,11 @@
- {{ $t("file.addFolder") }}
+ 添加文件夹
- {{ $t("file.addFile") }}
+ 添加文件
diff --git a/src/renderer/components/workAdd/files/listItem.vue b/src/renderer/components/workAdd/files/listItem.vue
index 8a95a85..5cae4eb 100644
--- a/src/renderer/components/workAdd/files/listItem.vue
+++ b/src/renderer/components/workAdd/files/listItem.vue
@@ -43,7 +43,7 @@ export default {
methods: {
getSize(size) {
if (size == -1) {
- return this.$t("file.calculate");
+ return '正在计算...';
}
return bytesToSize(size);
},
diff --git a/src/renderer/components/workAdd/workAdd.vue b/src/renderer/components/workAdd/workAdd.vue
index 56fbe7f..77f1a12 100644
--- a/src/renderer/components/workAdd/workAdd.vue
+++ b/src/renderer/components/workAdd/workAdd.vue
@@ -235,7 +235,12 @@ export default {
label: '2024-10-17',
has_copy_task: false,
has_print_task: false,
- ass_task: [],
+ ass_task: [
+ {
+ ass_task_index: 1,
+ path_file: []
+ }
+ ],
task_freq: 1
},
testForm: {
@@ -302,6 +307,7 @@ export default {
soonform: {},
fileData: {},
soonList: [],
+ fileLists: [],
file_name: null,
file_name3: '添加图片文件',
upload_disk: '',
@@ -397,6 +403,7 @@ export default {
this.$refs.files.addFile()
},
sizeChange(size) {
+ console.log(size)
this.size = size
},
async upload_over() {
@@ -522,8 +529,21 @@ export default {
// 提交
workSubmit() {
let that = this
+ const files = this.$refs.files.getLists()
+ for (let key in files) {
+ that.form.ass_task[0].path_file.push(files[key].path)
+ }
+ if (that.form.json_file === ''&& that.form.ass_task[0].path_file.length === 0) {
+ this.$message({
+ message: '请上传作业文件',
+ type: 'warning'
+ })
+ return
+ }
that.submitLoading = true
- // that.$store.dispatch('chat/websocketsend', that.testForm)
+ that.testForm.req_info = that.form
+ console.log(that.form, that.testForm)
+ that.$store.dispatch('chat/websocketsend', that.testForm)
setTimeout(() => {
that.$message({
message: '新建作业成功',
@@ -539,6 +559,7 @@ export default {
if (err) {
console.log(err)
} else {
+ console.log(files)
const fileList = files.map((file) => {
return {
label: file,
@@ -551,16 +572,25 @@ 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) => {
if (err) {
console.error('读取文件时出错:', err)
return
}
let name = e.split('\\')[1]
- this.fileLists[0] = new File([data], name, {
+ that.fileLists[0] = new File([data], name, {
type: ''
})
- this.readFile(data)
+ that.readFile(data)
})
},
// 读取文件信息
@@ -596,7 +626,6 @@ export default {
that.soonImg = that.fileData.frontDisplayPic
// that.$refs.refFile2.value = ''
// that.$refs.refFile3.value = ''
- console.log(that.fileData, that.soonList, that.soonform)
that.csvIsExist = false
that.file_name = null
that.file_name3 = '添加图片文件'
@@ -634,14 +663,15 @@ export default {
this.$refs.refFile3.dispatchEvent(new MouseEvent('click'))
},
fileLoad() {
- this.fileLists = this.$refs.refFile.files
+ let that = this
+ that.fileLists = this.$refs.refFile.files
let selectedFile = this.fileLists[0]
+ that.form.json_file = selectedFile.path
let reader = new FileReader()
reader.readAsText(selectedFile)
- let _this = this
- _this.currentTemplate = ''
+ that.currentTemplate = ''
reader.onload = function () {
- _this.readFile(this.result)
+ that.readFile(this.result)
}
},
fileLoad2() {
@@ -947,6 +977,9 @@ export default {
height: 500px;
.wook_soon_top {
height: 200px;
+ padding: 10px 0;
+ border-radius: 6px;
+ background-color: rgba(0, 0, 0, 0.2);
position: relative;
transition: all 0.5s;
.wook_soon_img {
@@ -954,7 +987,7 @@ export default {
}
.wook_soon_btn {
position: absolute;
- right: 0;
+ right: 10px;
bottom: 10px;
width: 56px;
height: 56px;
@@ -973,6 +1006,7 @@ export default {
}
}
.wook_soon_list {
+ border-radius: 6px;
transition: all 0.5s;
margin-top: 18px;
height: 282px;