hanfucheng 9 months ago
parent
commit
6eea2951b7

+ 14 - 0
data-ui/src/router/index.js

@@ -226,6 +226,20 @@ export const dynamicRoutes = [
     ]
   },
   {
+    path: '/center-data/data/housingconstruction/steelcylinderLog',
+    component: Layout,
+    hidden: true,
+    permissions: ['housingconstruction:log:list'],
+    children: [
+      {
+        path: 'index/:id',
+        component: () => import('@/views/data/housingconstruction/steelcylinderLog'),
+        name: 'steelcylinderLog',
+        meta: { title: '钢瓶日志', activeMenu: '/data/steelcylinderLog' }
+      }
+    ]
+  },
+  {
     path: '/tool/gen-edit',
     component: Layout,
     hidden: true,

+ 30 - 16
data-ui/src/views/data/housingconstruction/steelcylinder/index.vue

@@ -99,22 +99,23 @@
       <el-table-column label="修改时间" align="center" prop="updateTime"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['data:steelcylinder:edit']"
-          >修改
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['data:steelcylinder:remove']"
-          >删除
-          </el-button>
+          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"
+                       v-hasPermi="['system:role:edit']">
+            <span class="el-dropdown-link">
+              <i class="el-icon-d-arrow-right el-icon--right"></i>更多
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="edit" v-hasPermi="['data:steelcylinder:edit']">修改
+              </el-dropdown-item>
+              <el-dropdown-item command="remove" v-hasPermi="['data:steelcylinder:remove']">删除
+              </el-dropdown-item>
+              <el-dropdown-item>
+                <router-link :to="'/center-data/data/housingconstruction/steelcylinderLog/index/' + scope.row.id">
+                 运营数据
+                </router-link>
+              </el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
           <el-button
             size="mini"
             type="text"
@@ -628,6 +629,19 @@ export default {
     this.getEnterpriseList();
   },
   methods: {
+    // 更多操作触发
+    handleCommand(command, row) {
+      switch (command) {
+        case 'edit':
+          this.handleUpdate(row)
+          break
+        case 'remove':
+          this.handleDelete(row)
+          break
+        default:
+          break
+      }
+    },
     //获取充装员列表
     getPractitioner(id) {
       listPractitioner({"post": "practitioner_czy", "enterpriseId": id}).then(response => {

+ 4 - 18
data-ui/src/views/data/housingconstruction/steelcylinderLog/index.vue

@@ -1,21 +1,5 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"
-             @submit.native.prevent>
-      <el-form-item label="钢瓶名称" prop="steelcylinderName">
-        <el-input
-          v-model="queryParams.steelcylinderName"
-          placeholder="请输入钢瓶名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
@@ -100,12 +84,14 @@ export default {
     };
   },
   created() {
-    this.getList();
+    const id = this.$route.params && this.$route.params.id;
+    this.getList(id);
   },
   methods: {
     /** 查询钢瓶日志列表 */
-    getList() {
+    getList(id) {
       this.loading = true;
+      this.queryParams.steelcylinderId = id
       listSteelcylinderLog(this.queryParams).then(response => {
         this.listSteelcylinderLog = response.rows;
         this.total = response.total;