wennn 3 лет назад
Родитель
Сommit
f416fd53a1

+ 2 - 2
src/api/initialize.js

@@ -1,8 +1,8 @@
 import request from '@/utils/request'
 
-export function initData(partId) {
+export function initData() {
   return request({
-    url: `/initialize/init_data/${partId}`,
+    url: `/initialize/init_data`,
     method: 'GET'
   })
 }

+ 1 - 1
src/views/customer/components/customerManager.vue

@@ -452,7 +452,7 @@
           <template slot="label"><i class="el-icon-help"></i>{{ this.$t('customerManage.cardNo') }}</template>{{ formmodel.card_no }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template slot="label"><i class="el-icon-smoking"></i>{{ this.$t('customerManage.frame') }}</template>{{ formmodel.frame_id }}
+          <template slot="label"><i class="el-icon-smoking"></i>{{ this.$t('customerManage.frame') }}</template>{{ formmodel.full_name }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label"><i class="el-icon-time"></i>{{ this.$t('customerManage.inDate') }}</template>{{ formatterDate({ data: { in_date: formmodel.in_date, out_date: formmodel.out_date } }) }}

+ 0 - 8
src/views/ncs-orginazition/components/partInfoEdit.vue

@@ -346,7 +346,6 @@
 
         <el-form-item align="center" class="margin-top-sm">
           <el-button type="success" @click="onSubmit">{{ this.$t('partInfo.saveSettings') }}</el-button>
-          <el-button v-if="isShow" type="primary" @click="initializeSystem">{{ this.$t('partInfo.initializeSystem') }}</el-button>
           <el-button v-if="isShow" type="success" plain :disabled="isDisabled" @click="initialize485Device">{{ this.$t('partInfo.initialize485Device') }}</el-button>
           <el-button v-if="isShow" type="ss" @click="saveList">{{ this.$t('partInfo.addTestMemberList') }}</el-button>
           <el-button v-if="isShow" type="ss" @click="devicesRef">{{ this.$t('partInfo.devicesRef') }}</el-button>
@@ -541,13 +540,6 @@ export default {
         }
       })
     },
-    // 初始化系统
-    initializeSystem() {
-      const _this = this
-      initData(_this.partId).then(res => {
-        _this.$message.info(res.message)
-      })
-    },
     devicesRef() {
       const _this = this
       this.$confirm(this.$t('partInfo.sureDevicesRef') + '', this.$t('action.tips') + '', {

+ 14 - 1
src/views/ncs-orginazition/index.vue

@@ -21,6 +21,7 @@
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" size="mini" @click="createOrginazition">新建组织</el-button>
+          <el-button type="s" size="mini" :disabled="isDisabled" @click="initializeSystem">初始化系统</el-button>
         </div>
       </div>
       <el-pagination
@@ -103,6 +104,7 @@ import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
 import * as API_PartInfo from '@/api/ncs_partInfo'
 import { unix2Date } from '@/utils/Foundation'
 import ButtonCellRender from '../../components/AgGridCellRender/ButtonCellRender'
+import { initData } from '@/api/initialize'
 export default {
   name: 'Index',
   components: { ButtonCellRender },
@@ -151,7 +153,8 @@ export default {
       localeText: AG_GRID_LOCALE_CN,
       filterState: null,
       rowSelection: null,
-      frameworkComponents: null
+      frameworkComponents: null,
+      isDisabled: false
     }
   },
   computed: {
@@ -457,6 +460,16 @@ export default {
           })
         }
       })
+    },
+    // 初始化系统
+    initializeSystem() {
+      const _this = this
+      this.isDisabled = true
+      setTimeout(() => {
+        _this.isDisabled = false
+      }, 60000)
+      _this.$message.info('正在初始化,请稍后...')
+      initData()
     }
   }
 }