优化bug
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
<template>
|
||||
<div class="add_box">
|
||||
<el-dialog center :visible.sync="addShow" width="80%" top="10vh" title="新建作业" :close-on-press-escape="false" :close-on-click-modal="false" :show-close="false">
|
||||
<div
|
||||
class="work_body"
|
||||
v-loading="submitLoading"
|
||||
element-loading-text="正在准备任务,您也可以直接右上角关闭作业窗口"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)"
|
||||
>
|
||||
<el-dialog center :visible.sync="addShow" width="80%" top="10vh" title="新建作业" :close-on-press-escape="false"
|
||||
:close-on-click-modal="false" :show-close="false">
|
||||
<div class="work_body" v-loading="submitLoading" element-loading-text="正在准备任务,您也可以直接右上角关闭作业窗口"
|
||||
element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
<div @click="close" class="close_box">
|
||||
<img src="@/assets/images/Close_icon.png" />
|
||||
</div>
|
||||
@@ -18,7 +14,8 @@
|
||||
<div class="work_top_label">光盘类型:</div>
|
||||
<div class="work_top_val">
|
||||
<el-select v-model="form.cd_type" placeholder="请选择">
|
||||
<el-option v-for="item in cd_types" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||
<el-option v-for="item in cd_types" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -26,12 +23,13 @@
|
||||
<div class="work_top_label">任务类型:</div>
|
||||
<div class="work_top_val">
|
||||
<el-select v-model="form.copy_type" placeholder="请选择">
|
||||
<el-option v-for="item in copyList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||
<el-option v-for="item in copyList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-popover v-model="setShow" placement="bottom-end" trigger="click">
|
||||
<el-popover v-model="setShow" placement="bottom-end" trigger="click" @show="initSet">
|
||||
<div class="set_box">
|
||||
<div class="set_list">
|
||||
<!-- <div class="flex_box set_item">
|
||||
@@ -54,7 +52,8 @@
|
||||
<div class="set_label">刻录速率:</div>
|
||||
<div class="set_val">
|
||||
<el-select v-model="setForm.speed" placeholder="请选择">
|
||||
<el-option v-for="item in speedList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||
<el-option v-for="item in speedList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,7 +127,7 @@
|
||||
<div>添加文件</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="work_left_top_input">
|
||||
<div @contextmenu.prevent="showContextMenu" class="work_left_top_input">
|
||||
<el-input placeholder="请输入卷标" v-model="form.label">
|
||||
<template slot="prepend">卷标</template>
|
||||
</el-input>
|
||||
@@ -140,7 +139,8 @@
|
||||
<files ref="files" :onSizechange="sizeChange" :complete="upload_over"></files>
|
||||
</div>
|
||||
<div class="work_files_progress">
|
||||
<el-progress :text-inside="true" :percentage="file_percent" :format="format" :color="customColors"></el-progress>
|
||||
<el-progress :text-inside="true" :percentage="file_percent" :format="format"
|
||||
:color="customColors"></el-progress>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -152,7 +152,8 @@
|
||||
<div class="flex_box">
|
||||
<div class="work_right_top_label">标签</div>
|
||||
<el-select @change="changeTemplate" v-model="currentTemplate" placeholder="选择一个标签或点击创建标签">
|
||||
<el-option v-for="item in templates" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||
<el-option v-for="item in templates" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-tooltip content="选择更多模版" placement="bottom">
|
||||
<div @click="openFile" class="work_right_top_file">···</div>
|
||||
@@ -163,7 +164,8 @@
|
||||
<div class="wook_soon" :class="{ wook_soon1: !showList }">
|
||||
<div class="flex_box flex_row_center wook_soon_top">
|
||||
<img class="wook_soon_img" :src="soonImg" />
|
||||
<div @click="showList = !showList" class="flex_box flex_row_center wook_soon_btn" :class="{ wook_soon_btn1: !showList }">
|
||||
<div @click="showList = !showList" class="flex_box flex_row_center wook_soon_btn"
|
||||
:class="{ wook_soon_btn1: !showList }">
|
||||
<img src="@/assets/images/Arrow_up_icon.png" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,7 +180,9 @@
|
||||
<el-input clearable :disabled="csvIsExist" v-model="item.val" placeholder="请输入"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="openFile2" v-if="item.type == 3 || item.type == 4 || item.type == 5" class="wook_soon_add">添加字段</div>
|
||||
<div @click="openFile2" v-if="item.type == 3 || item.type == 4 || item.type == 5"
|
||||
class="wook_soon_add">添加字段
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -504,6 +508,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 右键事件
|
||||
showContextMenu() {
|
||||
console.log(123)
|
||||
ipcRenderer.send('show-context-menu');
|
||||
},
|
||||
// 进度条处理
|
||||
format(percentage) {
|
||||
const diskSize = this.cd_types.find((item) => item.value === this.form.cd_type).size
|
||||
@@ -530,7 +539,7 @@ export default {
|
||||
if (res.filePaths[0]) this.form.archive_path = res.filePaths[0]
|
||||
});
|
||||
},
|
||||
async upload_over() {},
|
||||
async upload_over() { },
|
||||
// 保存
|
||||
workSave() {
|
||||
let that = this
|
||||
@@ -548,12 +557,12 @@ export default {
|
||||
}
|
||||
}
|
||||
if (t) {
|
||||
let save = {...that.form}
|
||||
let save = { ...that.form }
|
||||
save.filesList = that.$refs.files.getLists()
|
||||
save.totalSize = that.totalSize
|
||||
if (that.soonList.length > 0) {
|
||||
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]) {
|
||||
item.val = that.$refs[item.origin_name][0].files[0].path
|
||||
}
|
||||
if (!item.val) {
|
||||
@@ -572,11 +581,11 @@ export default {
|
||||
.then((result) => {
|
||||
if (result.filePath == "") { return; }
|
||||
if (result.filePath.substring(result.filePath.length - 5).indexOf('.') == -1) {
|
||||
result.filePath += '.dwk';
|
||||
result.filePath += '.dwk';
|
||||
}
|
||||
fs.writeFileSync(result.filePath, v)
|
||||
that.$notify({
|
||||
message: '保存成功至'+result.filePath,
|
||||
message: '保存成功至' + result.filePath,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
@@ -743,7 +752,7 @@ export default {
|
||||
// csv文件处理
|
||||
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]) {
|
||||
if (item.type == 1 && that.$refs[item.origin_name][0].files[0]) {
|
||||
item.val = that.$refs[item.origin_name][0].files[0].path
|
||||
}
|
||||
if (!item.val) {
|
||||
@@ -754,9 +763,9 @@ export default {
|
||||
let csv2 = that.soonList.map(item => item.val).join(',')
|
||||
that.csvForm.req_info.file_text = csv1 + '\n' + csv2
|
||||
that.$store.dispatch('chat/websocketsend', that.csvForm).then(() => {
|
||||
|
||||
|
||||
}).catch(() => {
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
that.submitLoading = true
|
||||
@@ -911,7 +920,7 @@ export default {
|
||||
console.log(first_line, second_line)
|
||||
for (let i = 0; i < first_line.length; i++) {
|
||||
let index = that.soonList.findIndex(soon => soon.origin_name === first_line[i])
|
||||
if(index > -1) {
|
||||
if (index > -1) {
|
||||
that.soonList[index].val = second_line[i]
|
||||
}
|
||||
}
|
||||
@@ -949,12 +958,15 @@ export default {
|
||||
// 高级设置
|
||||
setCancel() {
|
||||
this.setShow = false
|
||||
this.setForm = this.$store.state.user.setForm
|
||||
},
|
||||
setSure() {
|
||||
this.setShow = false
|
||||
this.$store.dispatch('chat/setDatas', {name: 'workStatus', data: true})
|
||||
this.$store.dispatch('chat/setDatas', { name: 'workStatus', data: true })
|
||||
this.$store.dispatch('setDatas', { name: 'setForm', data: this.setForm })
|
||||
},
|
||||
initSet() {
|
||||
this.setForm = { ...this.$store.state.user.setForm }
|
||||
console.log(this.$store.state.user.setForm)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -966,22 +978,27 @@ export default {
|
||||
.el-dialog {
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.2);
|
||||
|
||||
.el-dialog__header {
|
||||
padding: 28px 28px 18px 0 0;
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.close_box {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
@@ -989,28 +1006,35 @@ export default {
|
||||
right: 0;
|
||||
cursor: pointer;
|
||||
padding: 24px 24px 0 0;
|
||||
|
||||
img {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.work_box {
|
||||
padding: 0 28px;
|
||||
|
||||
.work_top {
|
||||
height: 80px;
|
||||
|
||||
.work_top_item {
|
||||
margin-right: 50px;
|
||||
|
||||
.work_top_label {
|
||||
font-weight: 500;
|
||||
font-size: 19px;
|
||||
color: #000000;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.work_top_val {
|
||||
.el-input {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
width: 180px;
|
||||
@@ -1020,6 +1044,7 @@ export default {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
@@ -1030,6 +1055,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.work_top_set {
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
@@ -1040,6 +1066,7 @@ export default {
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #00c325;
|
||||
|
||||
img {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
@@ -1047,10 +1074,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.work_main {
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 4px;
|
||||
align-items: stretch;
|
||||
|
||||
.work_no {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
@@ -1061,23 +1090,28 @@ export default {
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
font-size: 50px;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.work_left {
|
||||
width: 50%;
|
||||
border-right: 1px solid #aaaaaa;
|
||||
padding: 0 16px 16px;
|
||||
position: relative;
|
||||
|
||||
.work_left_top {
|
||||
height: 72px;
|
||||
|
||||
.work_left_top_label {
|
||||
font-size: 19px;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
.work_left_top_btn {
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
@@ -1089,23 +1123,27 @@ export default {
|
||||
font-size: 16px;
|
||||
color: #00c325;
|
||||
margin-right: 22px;
|
||||
|
||||
img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.work_left_top_input {
|
||||
.el-input {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.el-input-group__prepend {
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
width: 180px;
|
||||
height: 40px;
|
||||
@@ -1114,6 +1152,7 @@ export default {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
@@ -1124,13 +1163,16 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.work_files {
|
||||
height: 500px;
|
||||
cursor: pointer;
|
||||
|
||||
.work_files_box {
|
||||
height: 478px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.work_files_progress {
|
||||
::v-deep {
|
||||
.el-progress-bar__outer {
|
||||
@@ -1142,18 +1184,22 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.work_right {
|
||||
width: 50%;
|
||||
padding: 0 16px 16px;
|
||||
position: relative;
|
||||
|
||||
.work_right_top {
|
||||
height: 76px;
|
||||
|
||||
.work_right_top_label {
|
||||
font-size: 19px;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
width: 300px;
|
||||
@@ -1163,6 +1209,7 @@ export default {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
@@ -1171,6 +1218,7 @@ export default {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.work_right_top_file {
|
||||
width: 63px;
|
||||
height: 40px;
|
||||
@@ -1185,6 +1233,7 @@ export default {
|
||||
text-align: center;
|
||||
margin: 0 22px;
|
||||
}
|
||||
|
||||
.work_right_top_add {
|
||||
width: 123px;
|
||||
height: 40px;
|
||||
@@ -1202,6 +1251,7 @@ export default {
|
||||
|
||||
.wook_soon {
|
||||
height: 500px;
|
||||
|
||||
.wook_soon_top {
|
||||
height: 200px;
|
||||
padding: 10px 0;
|
||||
@@ -1209,9 +1259,11 @@ export default {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
position: relative;
|
||||
transition: all 0.5s;
|
||||
|
||||
.wook_soon_img {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wook_soon_btn {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
@@ -1223,15 +1275,18 @@ export default {
|
||||
border-radius: 4px;
|
||||
transition: all 0.5s;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 25px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.wook_soon_btn1 {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.wook_soon_list {
|
||||
border-radius: 6px;
|
||||
transition: all 0.5s;
|
||||
@@ -1242,9 +1297,11 @@ export default {
|
||||
border: 1px solid #eaeaea;
|
||||
overflow-y: scroll;
|
||||
padding: 0 22px;
|
||||
|
||||
.wook_soon_item {
|
||||
height: 68px;
|
||||
border-bottom: 2px solid #e1f5e5;
|
||||
|
||||
.wook_soon_label {
|
||||
width: 200px;
|
||||
font-weight: 500;
|
||||
@@ -1252,10 +1309,12 @@ export default {
|
||||
color: #000000;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.wook_soon_input {
|
||||
width: 300px;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
width: 300px;
|
||||
@@ -1265,6 +1324,7 @@ export default {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
@@ -1274,6 +1334,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wook_soon_add {
|
||||
width: 110px;
|
||||
height: 40px;
|
||||
@@ -1291,10 +1352,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wook_soon1 {
|
||||
.wook_soon_top {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wook_soon_list {
|
||||
height: 0;
|
||||
margin: 0;
|
||||
@@ -1304,21 +1367,26 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer_box {
|
||||
height: 90px;
|
||||
padding: 0 28px;
|
||||
|
||||
.footer_main {
|
||||
gap: 20px;
|
||||
|
||||
.footer_input {
|
||||
.footer_input_btn {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.el-input-group__prepend {
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
width: 180px;
|
||||
height: 40px;
|
||||
@@ -1327,6 +1395,7 @@ export default {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
@@ -1336,6 +1405,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer_input1 {
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
@@ -1344,6 +1414,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer_btns {
|
||||
.footer_save {
|
||||
width: 166px;
|
||||
@@ -1356,6 +1427,7 @@ export default {
|
||||
padding: 0;
|
||||
margin-right: 22px;
|
||||
}
|
||||
|
||||
.footer_submit {
|
||||
width: 166px;
|
||||
height: 45px;
|
||||
@@ -1369,12 +1441,15 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 高级设置
|
||||
.set_box {
|
||||
.set_list {
|
||||
padding: 24px;
|
||||
|
||||
.set_item {
|
||||
padding: 10px 0;
|
||||
|
||||
.set_label {
|
||||
width: 180px;
|
||||
font-weight: 500;
|
||||
@@ -1384,6 +1459,7 @@ export default {
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.set_val {
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
@@ -1394,6 +1470,7 @@ export default {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
@@ -1402,13 +1479,17 @@ export default {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.el-switch {
|
||||
zoom: 1.2;
|
||||
}
|
||||
|
||||
.el-radio-group {
|
||||
padding: 10px 0;
|
||||
|
||||
.el-radio {
|
||||
display: flex;
|
||||
|
||||
.set_disk_name {
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
@@ -1416,6 +1497,7 @@ export default {
|
||||
line-height: 16px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.set_disk_desc {
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
@@ -1428,9 +1510,11 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.set_btns {
|
||||
border-top: 1px solid #e1f5e5;
|
||||
height: 62px;
|
||||
|
||||
.set_btn1 {
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
@@ -1443,6 +1527,7 @@ export default {
|
||||
padding: 0;
|
||||
margin: 0 12px;
|
||||
}
|
||||
|
||||
.set_btn2 {
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
|
||||
Reference in New Issue
Block a user