This commit is contained in:
24kycj
2024-12-02 13:42:37 +08:00
parent cdc56d6c71
commit 1dba691ab9
4 changed files with 27 additions and 25 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export default {
'$store.state.chat.printer_error': {
handler(val) {
let that = this
const currentTime = dayjs().format('hh:mm:ss');
const currentTime = dayjs().format('HH:mm:ss');
if (val.message) {
that.$message({
message: val.message,
+10 -4
View File
@@ -142,10 +142,16 @@ export default {
const _this = this;
dialog
.showOpenDialog({
properties: ["openFile", "multiSelections"],
properties: ["multiSelections"],
})
.then(async (res) => {
for (const item of res.filePaths) {
.then(async (rel) => {
console.log(rel);
for (const item of rel.filePaths) {
const stats = fs.statSync(item);
let folder = false
if (stats.isDirectory()) {
folder = true
}
await fs.stat(item, function (err, res) {
if (err) {
return false;
@@ -154,7 +160,7 @@ export default {
name: getFileName(item),
path: item,
size: res.size,
folder: false,
folder: folder,
});
});
}
+9 -13
View File
@@ -116,10 +116,10 @@
<div class="flex_box flex_row_between work_left_top">
<div class="flex_box">
<div class="work_left_top_label">内容</div>
<div @click="addFolder" class="flex_box work_left_top_btn">
<!-- <div @click="addFolder" class="flex_box work_left_top_btn">
<img src="@/assets/images/file_icon.png" />
<div>添加文件夹</div>
</div>
</div> -->
<div @click="addFile" class="flex_box work_left_top_btn">
<img src="@/assets/images/paper_icon.png" />
<div>添加文件</div>
@@ -381,8 +381,8 @@ export default {
diskSet: [
{
id: 1,
name: '文件大小',
desc: '按照文件大小进行序分盘'
name: '文件修改时间',
desc: '按照文件修改时间进行序分盘'
},
{
id: 2,
@@ -391,8 +391,8 @@ export default {
},
{
id: 3,
name: '文件修改时间',
desc: '按照文件修改时间进行序分盘'
name: '文件大小',
desc: '按照文件大小进行序分盘'
}
]
}
@@ -536,7 +536,6 @@ export default {
}
save.soonImg = that.soonImg
save.soonList = that.soonList
console.log(save)
const v = JSON.stringify(save)
dialog
.showSaveDialog({
@@ -612,11 +611,11 @@ export default {
return 0
})
} else if (this.setForm.disk === 3) {
// 按最后修改时间排序
fileList.sort((a, b) => a.mtime - b.mtime)
} else {
// 按文件大小排序
fileList.sort((a, b) => a.size - b.size)
} else {
// 按最后修改时间排序
fileList.sort((a, b) => a.mtime - b.mtime)
}
let index = 1
let total_size = 0
@@ -661,7 +660,6 @@ export default {
that.form.ass_task.push(task)
}
// csv文件处理
console.log(that.form.udf_file, that.soonList)
if (!that.form.udf_file && that.soonList.length > 0) {
that.soonList.forEach((item) => {
if (item.type == 1&&that.$refs[item.origin_name][0].files[0]) {
@@ -674,8 +672,6 @@ export default {
let csv1 = that.soonList.map(item => item.origin_name).join(',')
let csv2 = that.soonList.map(item => item.val).join(',')
that.csvForm.req_info.file_text = csv1 + '\n' + csv2
console.log(that.csvForm.req_info.file_text)
return
that.$store.dispatch('chat/websocketsend', that.csvForm).then(() => {
}).catch(() => {
+7 -7
View File
@@ -670,13 +670,13 @@ export default {
},
// 打开作业文件
openWork() {
// if (!that.workStatus) {
// that.$message({
// message: '请先连接服务',
// type: 'warning'
// })
// return
// }
if (!that.workStatus) {
that.$message({
message: '请先连接服务',
type: 'warning'
})
return
}
that.isNew = false
dialog
.showOpenDialog({