From 037af3bed10918cf24629f9a7f7e207af059ee96 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期日, 14 四月 2024 17:06:32 +0800
Subject: [PATCH] update
---
src/views/console/workstation/index.vue | 45 +++++++++++++++++++++++++--------------------
1 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/src/views/console/workstation/index.vue b/src/views/console/workstation/index.vue
index 8dfffa3..54b0281 100644
--- a/src/views/console/workstation/index.vue
+++ b/src/views/console/workstation/index.vue
@@ -19,7 +19,7 @@
<el-header>
<div class="left-panel">
<el-button @click="table_add" type="primary" icon="el-icon-plus"></el-button>
- <el-button type="danger" plain icon="el-icon-delete"></el-button>
+ <el-button type="danger" plain icon="el-icon-delete" @click="batchDel"></el-button>
<!-- <el-button type="primary" plain>瀵煎叆</el-button>
<el-button type="primary" plain>鎵归噺鎿嶄綔</el-button> -->
</div>
@@ -64,12 +64,12 @@
<el-button text type="primary" size="small">鍒犻櫎</el-button>
</template>
</el-popconfirm>
- <el-popconfirm title="纭畾鍋滅敤鍚楋紵"
+ <!-- <el-popconfirm title="纭畾鍋滅敤鍚楋紵"
@confirm="table_del(scope.row, scope.$index,'1')">
<template #reference>
<el-button text type="primary" size="small">鍋滅敤</el-button>
</template>
- </el-popconfirm>
+ </el-popconfirm> -->
</el-button-group>
</template>
</el-table-column>
@@ -85,9 +85,9 @@
<li>宸ヤ綅缂栧彿 {{previewData.code}}</li>
<li>宸ヤ綅缁� {{previewData.groupName}}</li>
<li>宸ヤ綅鍚嶇О {{previewData.name}}</li>
- <li>宸ヤ綅绫诲瀷 {{previewData.type}}</li>
+ <li>宸ヤ綅绫诲瀷 {{types.find(v => v.value == previewData.type)?.label}}</li>
<li>宸ヤ綅鏃ュ巻 {{previewData.calendarName}}</li>
- <li>鐘舵�� {{previewData.status}}</li>
+ <li>鐘舵�� {{previewData.status ? '鍚敤' : '绂佺敤'}}</li>
</ul>
</div>
<el-tabs tab-position="top" class="custom-tabs" v-model="normal">
@@ -237,7 +237,7 @@
</el-tabs>
</el-card>
- <Dialog ref="dialog" :option="{types,status,group}"></Dialog>
+ <Dialog ref="dialog" @success="success" :option="{types,status,group}"></Dialog>
</el-main>
</template>
@@ -263,29 +263,25 @@
params: {},
keyWord: '',
type: '',
- statu: '1',
+ statu: 1,
types: [
{
- label: '鎵�鏈�',
- value: ''
- },
- {
label: '鏈哄櫒',
- value: '0'
+ value: 0
},
{
label: '浜哄伐',
- value: '1'
+ value: 1
},
],
status: [
{
label: '鍚敤',
- value: '1'
+ value: 1
},
{
label: '鍋滅敤',
- value: '0'
+ value: 0
}
],
previewData: {},
@@ -305,7 +301,8 @@
treeCheckKey: [],
beltline_type: [],
group_tag: [],
- addGroupShow: false
+ addGroupShow: false,
+ selection: []
}
},
watch: {
@@ -360,6 +357,9 @@
this.group_tag = res.data
})
+ },
+ success () {
+ this.search()
},
async queryList(flag) {
this.showGrouploading = true
@@ -483,13 +483,18 @@
this.$refs.dialog.open('edit',row)
},
table_del(row, index,type) {
- this.$API.workstation.deleteWork.delete({
- type,
- workstationIds:row.id
- }).then(() => {
+ this.$HTTP.delete(`/api/blade-cps/workstation?type=0&workstationIds=${row.id}`).then(res => {
this.search()
})
},
+ selectionChange (selection) {
+ this.selection = selection
+ },
+ batchDel () {
+ this.$HTTP.delete(`/api/blade-cps/workstation?type=0&workstationIds=${this.selection.map(item => item.id).join(',')}`).then(res => {
+ this.search()
+ })
+ }
}
}
</script>
--
Gitblit v1.9.3