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