From e2fdfe540eaf160dc7d063c60667041edcc64e86 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期二, 05 十一月 2024 22:55:14 +0800
Subject: [PATCH] 处理显示名称

---
 src/views/mdc/configComp/Status.vue |   34 ++++++++++++++++++++++------------
 1 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/src/views/mdc/configComp/Status.vue b/src/views/mdc/configComp/Status.vue
index 1dce398..d56a78b 100644
--- a/src/views/mdc/configComp/Status.vue
+++ b/src/views/mdc/configComp/Status.vue
@@ -1,8 +1,8 @@
 <!--
  * @Date: 2024-04-17 18:53:45
- * @LastEditors: Sneed
- * @LastEditTime: 2024-06-18 20:17:23
- * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/configComp/Status.vue
+ * @LastEditors: gaosp
+ * @LastEditTime: 2024-09-19 21:45:01
+ * @FilePath: /mdc/Users/mache/Documents/demo/cps-web/src/views/mdc/configComp/Status.vue
 -->
 <template>
     <el-main>
@@ -35,10 +35,10 @@
                 </el-table-column>
             </scFormTable>
         </el-row>
-        <el-row style="margin-top: 20px;">
+        <el-row style="margin-top: 20px;position: relative">
             <!-- dragSort -->
-            <scFormTable ref="table1" v-model="Tabledata" stripe @delRow="remove" :addTemplate="addTemplate"
-                @rowDrop="rowDrop" dragSort>
+            <scFormTable ref=" table1" v-model="Tabledata" stripe @delRow="remove" :addTemplate="addTemplate"
+                @rowDrop="rowDrop" dragSort hideDelete>
                 <el-table-column label="浜哄伐鍙嶉鐘舵��" prop="name">
                     <template #default="scope">
                         <el-input v-model="scope.row.name" @change="update(scope.row)"></el-input>
@@ -67,6 +67,11 @@
                 </el-table-column>
                 <el-table-column label="鎿嶄綔" prop="state">
                     <template #default="scope">
+                        <el-popconfirm title="纭畾鍒犻櫎鍚楋紵" @confirm="rowDel(scope.row, scope.$index)">
+                            <template #reference>
+                                <el-button type="danger" icon="el-icon-delete" size="small" plain circle></el-button>
+                            </template>
+                        </el-popconfirm>
                         <el-button v-show="scope.row.isNew" @click="add(scope.row)">淇濆瓨</el-button>
                     </template>
                 </el-table-column>
@@ -170,8 +175,13 @@
         this.getList()
     },
     methods: {
+        rowDel(row, index) {
+            // this.$emit('delRow', row)
+            this.remove(row)
+            this.data.splice(index, 1)
+        },
         getList() {
-            this.$HTTP.get('/api/blade-cps/global_wcs/wcs-achievements').then(res => {
+            this.$HTTP.get('/api/smis/global_wcs/wcs-achievements').then(res => {
                 if (res.code === 200) {
                     this.data = res.data.filter(v => v.type === 1)
                     this.Tabledata = res.data.filter(v => v.type === 4)
@@ -179,7 +189,7 @@
             })
         },
         save() {
-            this.$HTTP.post('/api/blade-cps/global_wcs/update-wcs-seq', this.data.map(v => v.code)).then(res => {
+            this.$HTTP.post('/api/smis/global_wcs/update-wcs-seq', this.data.map(v => v.code)).then(res => {
                 if (res.code == 200) {
                     this.$message.success(`鎿嶄綔鎴愬姛`)
                     this.getList()
@@ -198,7 +208,7 @@
                 name: row.name,
                 rps: row.rps
             }
-            this.$HTTP.post('/api/blade-cps/global_wcs/update-wcs-achievements', data).then(res => {
+            this.$HTTP.post('/api/smis/global_wcs/update-wcs-achievements', data).then(res => {
                 if (res.code == 200) {
                     this.$message.success(`鎿嶄綔鎴愬姛`)
                     this.getList()
@@ -221,7 +231,7 @@
                 rps: row.rps,
                 type: 4,
             }
-            this.$HTTP.post('/api/blade-cps/global_wcs/add-wcs-achievements', data).then(res => {
+            this.$HTTP.post('/api/smis/global_wcs/add-wcs-achievements', data).then(res => {
                 if (res.code == 200) {
                     this.$message.success(`鎿嶄綔鎴愬姛`)
                     this.getList()
@@ -229,7 +239,7 @@
             })
         },
         remove(row) {
-            this.$HTTP.delete(`/api/blade-cps/global_wcs/delete-wcs-achievements/${row.code}`).then(res => {
+            this.$HTTP.delete(`/api/smis/global_wcs/delete-wcs-achievements/${row.code}`).then(res => {
                 if (res.code == 200) {
                     this.$message.success(`鎿嶄綔鎴愬姛`)
                     this.getList()
@@ -237,7 +247,7 @@
             })
         },
         rowDrop(arr) {
-            this.$HTTP.post(`/api/blade-cps/global_wcs/update-wcs-seq`, arr.map(v => v.code)).then(res => {
+            this.$HTTP.post(`/api/smis/global_wcs/update-wcs-seq`, arr.map(v => v.code)).then(res => {
                 if (res.success) {
                     this.$message.success(res.msg)
                 } else {

--
Gitblit v1.9.3