Browse Source

修复字典功能

zangkai 5 năm trước cách đây
mục cha
commit
2fd15c737a

+ 5 - 5
frontend_web/src/api/sysadmin/itemdetail.js

@@ -4,7 +4,7 @@ export default {
   // 获取字典列表
   getList (params) {
     return request({
-      url: process.env.VUE_APP_API02 + 'itemdetail/getpagelist',
+      url: process.env.VUE_APP_API + 'itemdetail/getpagelist',
       method: 'get',
       params: params
     })
@@ -12,7 +12,7 @@ export default {
   // 添加
   add (formData) {
     return request({
-      url: process.env.VUE_APP_API02 + 'itemdetail/additemdetail',
+      url: process.env.VUE_APP_API + 'itemdetail/additemdetail',
       method: 'post',
       data: formData
     })
@@ -20,7 +20,7 @@ export default {
   // 修改
   update (formData) {
     return request({
-      url: process.env.VUE_APP_API02 + 'itemdetail/updateitemdetail',
+      url: process.env.VUE_APP_API + 'itemdetail/updateitemdetail',
       method: 'post',
       data: formData
     })
@@ -28,7 +28,7 @@ export default {
   // 获取详情
   getEntityById (params) {
     return request({
-      url: process.env.VUE_APP_API02 + 'itemdetail/getdetailbyid',
+      url: process.env.VUE_APP_API + 'itemdetail/getdetailbyid',
       method: 'get',
       params: params
     })
@@ -36,7 +36,7 @@ export default {
   // 删除学生
   delete (params) {
     return request({
-      url: process.env.VUE_APP_API02 + 'itemdetail/deletebyid',
+      url: process.env.VUE_APP_API + 'itemdetail/deletebyid',
       method: 'get',
       params: params
     })

+ 85 - 74
frontend_web/src/router/routes.js

@@ -57,56 +57,56 @@ const frameIn = [
         },
         component: _import('demo/page3')
       },
-     // 设备管理
-     {
-      path: 'instrument',
-      name: 'instrument',
-      meta: {
-        title: '设备管理',
-        auth: true
+      // 设备管理
+      {
+        path: 'instrument',
+        name: 'instrument',
+        meta: {
+          title: '设备管理',
+          auth: true
+        },
+        component: _import('instrument')
       },
-      component: _import('instrument')
-    },
-     // 人员管理
-     {
-      path: 'personnel',
-      name: 'personnel',
-      meta: {
-        title: '人员管理',
-        auth: true
+      // 人员管理
+      {
+        path: 'personnel',
+        name: 'personnel',
+        meta: {
+          title: '人员管理',
+          auth: true
+        },
+        component: _import('personnel')
       },
-      component: _import('personnel')
-    },
-    // 班级管理
-    {
-      path: 'class',
-      name: 'class',
-      meta: {
-        title: '班级管理',
-        auth: true
+      // 班级管理
+      {
+        path: 'class',
+        name: 'class',
+        meta: {
+          title: '班级管理',
+          auth: true
+        },
+        component: _import('class')
       },
-      component: _import('class')
-    }, 
-    // 值班管理
-    {
-      path: 'duty',
-      name: 'duty',
-      meta: {
-        title: '值班管理',
-        auth: true
+      // 值班管理
+      {
+        path: 'duty',
+        name: 'duty',
+        meta: {
+          title: '值班管理',
+          auth: true
+        },
+        component: _import('duty')
       },
-      component: _import('duty')
-    },
-    // 信息发布
-    {
-      path: 'information',
-      name: 'information',
-      meta: {
-        title: '信息发布',
-        auth: true
+      // 信息发布
+      {
+        path: 'information',
+        name: 'information',
+        meta: {
+          title: '信息发布',
+          auth: true
+        },
+        component: _import('information')
       },
-      component: _import('information')
-    },
 
       // 系统 前端日志
       {
@@ -251,8 +251,19 @@ const frameIn = [
         },
         component: _import('sysadmin/item/index')
       },
-       // 房间管理
-       {
+      // 字典项
+      {
+        path: '/sysadmin/itemdetail',
+        name: 'itemDetailEdit',
+        meta: {
+          title: '字典项',
+          auth: true,
+          cache: true
+        },
+        component: _import('sysadmin/item_detail/index')
+      },
+      // 房间管理
+      {
         path: 'managingrooms',
         name: 'managingrooms',
         meta: {
@@ -261,36 +272,36 @@ const frameIn = [
         },
         component: _import('managingrooms')
       },
-        // 运行记录
-        {
-          path: 'instrument/instrumenrunrecord',
-          name: 'instrument/instrumenrunrecord',
-          meta: {
-            title: '运行记录',
-            auth: true
-          },
-          component: _import('instrument/instrumenrunrecord')
+      // 运行记录
+      {
+        path: 'instrument/instrumenrunrecord',
+        name: 'instrument/instrumenrunrecord',
+        meta: {
+          title: '运行记录',
+          auth: true
         },
-         // 维护保养
-        {
-          path: 'instrument/maintainlog',
-          name: 'instrument/maintainlog',
-          meta: {
-            title: '维护保养',
-            auth: true
-          },
-          component: _import('instrument/maintainlog')
+        component: _import('instrument/instrumenrunrecord')
+      },
+      // 维护保养
+      {
+        path: 'instrument/maintainlog',
+        name: 'instrument/maintainlog',
+        meta: {
+          title: '维护保养',
+          auth: true
         },
-        //确认及报废
-        {
-          path: 'instrument/confirmandscrap',
-          name: 'instrument/confirmandscrap',
-          meta: {
-            title: '确认及报废',
-            auth: true
-          },
-          component: _import('instrument/confirmandscrap')
+        component: _import('instrument/maintainlog')
+      },
+      // 确认及报废
+      {
+        path: 'instrument/confirmandscrap',
+        name: 'instrument/confirmandscrap',
+        meta: {
+          title: '确认及报废',
+          auth: true
         },
+        component: _import('instrument/confirmandscrap')
+      }
       // ================== add 字典分类 08-12 e ====================
 
     ]

+ 16 - 4
frontend_web/src/views/sysadmin/item/components/command.vue

@@ -1,8 +1,20 @@
 <template>
   <div>
-    <el-button size="mini" type="primary" icon="el-icon-edit" circle @click="handleEdit"></el-button>
-    <el-button size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete()"></el-button>
-    <el-button size="mini" type="info" icon="el-icon-notebook-2" circle @click="handleDetail()"></el-button>
+    <el-button size="mini"
+               type="primary"
+               icon="el-icon-edit"
+               circle
+               @click="handleEdit"></el-button>
+    <el-button size="mini"
+               type="danger"
+               icon="el-icon-delete"
+               circle
+               @click="handleDelete()"></el-button>
+    <el-button size="mini"
+               type="info"
+               icon="el-icon-notebook-2"
+               circle
+               @click="handleDetail()"></el-button>
   </div>
 </template>
 
@@ -32,7 +44,7 @@ export default Vue.extend({
       }).catch(() => { })
     },
     handleDetail () {
-      let Id = this.params.data['Id']
+      let Id = parseInt(this.params.data['Id'])
       let name = this.params.data['FullName']
       this.$router.push({ path: '/sysadmin/itemdetail', query: { Id: Id, name: name } })
     }