Browse Source

数据集数据源删除

yanzili 4 năm trước cách đây
mục cha
commit
3f9b4ff6d6

+ 16 - 15
report-ui/src/views/report/bigscreen/designer/index.vue

@@ -59,21 +59,15 @@
                 <li>
                 <li>
                   <div><i class="el-icon-full-screen mr10"></i>边框 <i class="el-icon-arrow-right ml20"></i></div>
                   <div><i class="el-icon-full-screen mr10"></i>边框 <i class="el-icon-arrow-right ml20"></i></div>
                   <ul class="three-level">
                   <ul class="three-level">
-                    <li><a href="#">三级菜单项</a></li>
-                    <li><a href="#">三级菜单项</a></li>
-                    <li><a href="#">三级菜单项</a></li>
-                    <li><a href="#">三级菜单项</a></li>
-                    <li><a href="#">三级菜单项</a></li>
+                    <li><a href="#">122222222</a></li>
+                    <li><a href="#">222222222222312</a></li>
+                    <li><a href="#">3ewwwwwrwerwer</a></li>
                   </ul>
                   </ul>
                 </li>
                 </li>
                 <li>
                 <li>
                   <div><i class="el-icon-magic-stick mr10"></i>装饰<i class="el-icon-arrow-right ml20"></i></div>
                   <div><i class="el-icon-magic-stick mr10"></i>装饰<i class="el-icon-arrow-right ml20"></i></div>
                   <ul class="three-level">
                   <ul class="three-level">
-                    <li><a href="#">三级菜单项</a></li>
-                    <li><a href="#">三级菜单项</a></li>
-                    <li><a href="#">三级菜单项</a></li>
-                    <li><a href="#">三级菜单项</a></li>
-                    <li><a href="#">三级菜单项</a></li>
+                    <!-- <li><a href="#">4</a></li> -->
                   </ul>
                   </ul>
                 </li>
                 </li>
               </ul>
               </ul>
@@ -866,7 +860,7 @@ li {
 }
 }
 
 
 .nav ul {
 .nav ul {
-  display: none;
+  // display: none;
   background: #00113a;
   background: #00113a;
   position: absolute;
   position: absolute;
   z-index: 10000;
   z-index: 10000;
@@ -881,14 +875,21 @@ li {
   display: block;
   display: block;
 }
 }
 .nav > li > .three-level > li > a {
 .nav > li > .three-level > li > a {
-  width: 10em;
+  width: 100%;
   padding-left: 1em;
   padding-left: 1em;
   padding-right: 1em;
   padding-right: 1em;
   background-color: #0f2030;
   background-color: #0f2030;
 }
 }
-// .nav li .three-level li {
-//   display: none;
-// }
+.nav li .three-level {
+  padding: 10px 20px;
+}
+.nav li .three-level li {
+  width: 33.333%;
+  height: 80px;
+  float: left;
+  height: 80px;
+  display: inline-block;
+}
 .nav > li > ul > li:hover > a {
 .nav > li > ul > li:hover > a {
   display: block;
   display: block;
   background-color: #182e42;
   background-color: #182e42;

+ 29 - 8
report-ui/src/views/report/datasource/index.vue

@@ -106,11 +106,12 @@
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button type="text"
           <el-button type="text"
                      @click="showAddLogModel(scope.row)">编辑</el-button>
                      @click="showAddLogModel(scope.row)">编辑</el-button>
-          <el-popconfirm :title="'确定删除' + scope.row.sourceNameCode + '吗?'"
-                         @onConfirm="delData(scope.row)">
-            <el-button slot="reference"
-                       type="text">删除</el-button>
-          </el-popconfirm>
+          <!-- <el-popconfirm :title="'确定删除' + scope.row.sourceNameCode + '吗?'"
+                         @onConfirm="delData(scope.row)"> -->
+          <el-button slot="reference"
+                     @click="delData(scope.row)"
+                     type="text">删除</el-button>
+          <!-- </el-popconfirm> -->
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -376,9 +377,29 @@ export default {
       })
       })
     },
     },
     async delData (val) {
     async delData (val) {
-      const { code } = await deleteDataSource(val)
-      if (code != '200') return
-      this.queryByPage()
+      this.$confirm('确定删除?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(async () => {
+          this.$emit('deletelayer')
+          this.visible = false
+          const { code, data } = await deleteDataSource(val)
+          if (code != '200') return
+          this.queryByPage()
+          this.$message({
+            type: 'success',
+            message: '删除成功!',
+          })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除',
+          })
+        })
+
     },
     },
     // 提交
     // 提交
     async UserConfirm (formName) {
     async UserConfirm (formName) {

+ 31 - 9
report-ui/src/views/report/resultset/index.vue

@@ -97,11 +97,12 @@
           <el-button size="mini"
           <el-button size="mini"
                      type="text"
                      type="text"
                      @click="addOrEditDataSet(scope.row)">编辑</el-button>
                      @click="addOrEditDataSet(scope.row)">编辑</el-button>
-          <el-popconfirm :title="'确定删除' + scope.row.setName + '吗?'"
-                         @onConfirm="delect(scope.row)">
-            <el-button slot="reference"
-                       type="text">删除</el-button>
-          </el-popconfirm>
+          <!-- <el-popconfirm :title="'确定删除' + scope.row.setName + '吗?'"
+                         @onConfirm="delect(scope.row)"> -->
+          <el-button slot="reference"
+                     type="text"
+                     @click="delect(scope.row)">删除</el-button>
+          <!-- </el-popconfirm> -->
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -614,10 +615,29 @@ export default {
       this.caseResultTitle = item.setName
       this.caseResultTitle = item.setName
       this.caseResultContent = JSON.parse(item.caseResult)
       this.caseResultContent = JSON.parse(item.caseResult)
     },
     },
-    async delect (row) {
-      this.visible = false
-      const { code, data } = await deleteDataSet(row)
-      if (code != '200') return
+    delect (row) {
+      this.$confirm('确定删除?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(async () => {
+          this.$emit('deletelayer')
+          this.visible = false
+          const { code, data } = await deleteDataSet(row)
+          if (code != '200') return
+          this.queryByPage()
+          this.$message({
+            type: 'success',
+            message: '删除成功!',
+          })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除',
+          })
+        })
     },
     },
     // 编辑数据集,获取单条数据详情
     // 编辑数据集,获取单条数据详情
     addOrEditDataSet (row) {
     addOrEditDataSet (row) {
@@ -901,9 +921,11 @@ export default {
             if (this.dialogFormVisibleTitle === '新增数据集') {
             if (this.dialogFormVisibleTitle === '新增数据集') {
               const { code } = await addDataSet(this.formData)
               const { code } = await addDataSet(this.formData)
               if (code != '200') return
               if (code != '200') return
+              this.queryByPage()
             } else {
             } else {
               const { code } = await editDataSet(this.formData)
               const { code } = await editDataSet(this.formData)
               if (code != '200') return
               if (code != '200') return
+              this.queryByPage()
             }
             }
             this.dialogFormVisible = false
             this.dialogFormVisible = false
           } else {
           } else {