|
|
|
@ -8,6 +8,9 @@ |
|
|
|
<el-form-item> |
|
|
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="danger" @click="deptUpdate()">同步</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table v-loading="dataListLoading" :data="dataList" border style="width: 100%;"> |
|
|
|
<table-tree-column prop="name" :label="$t('dept.name')" header-align="center" align="center"></table-tree-column> |
|
|
|
@ -56,6 +59,27 @@ export default { |
|
|
|
} |
|
|
|
this.options = res.data.options |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
deptUpdate () { |
|
|
|
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('update') }), this.$t('prompt.title'), { |
|
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http.get(`/cloudAnalysis/metaSysdeptManager/deptUpdate`).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.getDataList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { }) |
|
|
|
}).catch(() => { }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|