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 | 41 ++++++++++++++++++++++++++++++++--------- 1 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/container/maintenance/index.vue b/src/container/maintenance/index.vue index e861d9e..0ee6856 100644 --- a/src/container/maintenance/index.vue +++ b/src/container/maintenance/index.vue @@ -1,7 +1,7 @@ <!-- * @Date: 2024-01-06 17:40:19 * @LastEditors: Sneed - * @LastEditTime: 2024-01-14 16:13:57 + * @LastEditTime: 2024-01-14 18:55:28 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/maintenance/index.vue --> <template> @@ -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> @@ -108,12 +108,12 @@ <el-table-column align="center" label="鎿嶄綔" prop="editor"> <template slot-scope="scope"> <el-button size="mini" type="text" @click="addDevice(2, scope.row, $event)">缂栬緫</el-button> - <el-button size="mini" type="text" @click="deleteHandle(2, scope.row)">鍒犻櫎</el-button> + <el-button size="mini" type="text" @click="deleteHandle(scope.row)">鍒犻櫎</el-button> </template> </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) }) @@ -194,8 +200,25 @@ }) } }, - deleteHandle() { - + deleteHandle(row) { + this.$confirm('纭畾瑕佹案涔呭垹闄ゆ椤�?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + getRequest('maintainDel', { ids: [row.id] }).then(res => { + this.$message({ + type: 'success', + message: '鍒犻櫎鎴愬姛锛�' + }) + this.query(); + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }) + }) + }) }, submitForm() { -- Gitblit v1.9.3