|
@@ -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()
|
|
|
}
|
|
|
}
|
|
|
}
|