From 103fd0aa7288b58cf250a55da1cc6c659a2e113e Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期三, 02 十月 2024 22:04:41 +0800
Subject: [PATCH] 日历及其他问题修改
---
src/views/console/workstation/Dialog.vue | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/views/console/workstation/Dialog.vue b/src/views/console/workstation/Dialog.vue
index ea60a89..895569e 100644
--- a/src/views/console/workstation/Dialog.vue
+++ b/src/views/console/workstation/Dialog.vue
@@ -45,7 +45,7 @@
<el-form-item label="鐢熶骇鏃ュ巻" prop="calendarCode">
<el-select v-model="form.calendarCode" style="width: 240px">
<el-option v-for="item in options.calendarList" :key="item.id" :label="item.name"
- :value="item.id" />
+ :value="item.code" />
</el-select>
</el-form-item>
</el-col>
@@ -68,7 +68,8 @@
filterable>
<el-option v-for="item in options.listnoband" :key="item.id" :label="item.machineName"
:value="item.id">
- {{ `${item?.machineCode}-${item?.machineName}-${item?.brand}` }}</el-option>
+ {{ `${item?.machineCode}-${item?.machineName}${item?.brand ? '-' + item.brand : ''}`
+ }}</el-option>
</el-select>
<el-input v-if="form.id" :disabled="form.id" v-model="form.machineName"></el-input>
</el-form-item>
@@ -88,11 +89,11 @@
<el-form-item label="鍔犲伐灞炴��" prop="properties">
<el-select v-model="form.properties" style="width: 240px">
<el-option v-for="item in options.machining_type" :key="item.dictKey"
- :label="item.dictValue" :value="item.dictKey" />
+ :label="item.dictValue" :value="item.dictKey - 0" />
</el-select>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="绋嬪簭浼犺緭鏂瑰紡" prop="transmissionMethod">
<el-select v-model="form.transmissionMethod" style="width: 240px">
<el-option label="FTP" :value="1" />
@@ -107,7 +108,7 @@
:value="item.value" />
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="12" v-if="form.ftpDirectoryType == 1">
<el-form-item label="鍏宠仈鐩綍" prop="directoryId">
<el-select v-model="form.directoryId" style="width: 240px">
@@ -309,7 +310,7 @@
})
} else {
this.form.id = ''
- this.form.workbenchVOList = res?.data?.workstationList || []
+ this.form.workbenchVOList = []
Object.keys(this.form).forEach(key => {
this.form[key] = ''
})
@@ -318,10 +319,22 @@
},
//琛ㄥ崟鎻愪氦鏂规硶
submit() {
+ if (!this.form.workbenchVOList) {
+ this.form.workbenchVOList = []
+ }
+ if (this.mode === 'add' && this.form.linkWay === 1) {
+ this.form.machineId
+ this.form.machineCode = this.form.code
+ this.form.machineName = this.form.name
+ }
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
- var res = await this.$API.workstation.add.post(this.form);
+ try {
+ var res = await this.$API.workstation.add.post(this.form);
+ } catch (error) {
+ this.isSaveing = false;
+ }
this.isSaveing = false;
if (res.code == 200) {
this.$emit('success', this.form, this.mode)
--
Gitblit v1.9.3