From c5488b34876f863558219f998e75c798c34af3cd Mon Sep 17 00:00:00 2001 From: yangys <y_ys79@sina.com> Date: 星期二, 16 一月 2024 22:10:32 +0800 Subject: [PATCH] 修改标题错误 --- src/container/maintenance/index.vue | 18 ++++++++++++------ src/container/maintenance/dailyMAdd.vue | 13 ++++++++----- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/container/maintenance/dailyMAdd.vue b/src/container/maintenance/dailyMAdd.vue index 3213798..002885f 100644 --- a/src/container/maintenance/dailyMAdd.vue +++ b/src/container/maintenance/dailyMAdd.vue @@ -14,7 +14,7 @@ <el-option v-for="item in machineList" :key="item.id" - :label="item.name" + :label="item.machineName" :value="item.id"> </el-option> </el-select> @@ -104,7 +104,7 @@ import { getMachineList, maintainCreate, maintainUpdate, userList, departmentGet } from '@/api/MdcApi' import { getRequest } from '@/api/Api' export default { - props: ['styles', 'departmentlist','machineList','userList'], + props: ['styleName','styles','styleValue', 'departmentlist','machineList','userList'], data() { return { dataForm: { @@ -113,6 +113,7 @@ maintainPerson: '', isQualified: '', detail: '', + style: '', }, dialogVisibleAdd: false, // 涓嬫媺妗� @@ -133,11 +134,13 @@ init(n, data) { this.data = data this.no = n + if (n === 1) { - this.title = '鏂板' + this.style + this.title = '鏂板' + this.styleName Object.keys(this.dataForm).forEach(key => { this.dataForm[key] = '' }) + this.dataForm['style'] = '' } else { this.title = '淇敼' + this.style Object.keys(this.dataForm).forEach(key => { @@ -176,7 +179,7 @@ completeDateFrom, completeDateTo, isQualified, - styles: this.style + style: this.styleValue }).then(res => { if (res.result === 'SUCCESS') { this.$message({ @@ -201,7 +204,7 @@ completeDateFrom, completeDateTo, isQualified, - styles: this.style + style: this.styleValue }).then(res => { if (res.result === 'SUCCESS') { this.$message({ diff --git a/src/container/maintenance/index.vue b/src/container/maintenance/index.vue index 577e863..0ee6856 100644 --- a/src/container/maintenance/index.vue +++ b/src/container/maintenance/index.vue @@ -16,7 +16,7 @@ <div class="item"> <span>璁惧鍚嶇О</span> <el-select class="item-value" v-model="queryInfo.machineName" placeholder="璇烽�夋嫨"> - <el-option v-for="item in machineList" :key="item.id" :label="item.name" :value="item.id"> + <el-option v-for="item in machineList" :key="item.id" :label="item.machineName" :value="item.id"> </el-option> </el-select> </div> @@ -113,7 +113,7 @@ </el-table-column> </template> </List> - <DailyMAddD ref="dailyMAddD" @reflash="submitForm" :style="navName" :departmentlist="departmentlist" :machineList="machineList" :userList="userList"></DailyMAddD> + <DailyMAddD ref="dailyMAddD" @reflash="submitForm" :styleValue="getStyle" :styleName="navName" :departmentlist="departmentlist" :machineList="machineList" :userList="userList"></DailyMAddD> </div> </template> <script> @@ -128,8 +128,12 @@ }, computed: { navName () { - let names = ['鏃ュ父淇濆吇','涓�绾�','浜岀骇','涓夌骇'] - return names[this.$route.params.style-1] + let names = ['鏃ュ父淇濆吇','涓�绾т繚鍏�','浜岀骇淇濆吇','涓夌骇淇濆吇'] + return names[this.$route.params.style-1] + }, + + getStyle () { + return this.$route.params.style; } }, data() { @@ -140,6 +144,7 @@ queryInfo: { uuid: '', machineName: '', + style: this.$route.params.style, type: '', specification: '', department: '', @@ -175,6 +180,7 @@ this.userList = res.data.list }) }, + query() { this.$refs.list.pageQuery(this.queryInfo) }, @@ -184,7 +190,7 @@ }) }, addDevice(n, row, event) { - if (n === 1) { + if (n === 1) {//娣诲姞 this.$nextTick(() => { this.$refs.dailyMAddD.init(n) }) @@ -205,7 +211,7 @@ type: 'success', message: '鍒犻櫎鎴愬姛锛�' }) - this.submitForm() + this.query(); }).catch(() => { this.$message({ type: 'info', -- Gitblit v1.9.3