|
|
|
@ -32,6 +32,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button> |
|
|
|
<el-button v-if="!authSync" :loading="syncLoading" @click="syncPartCatalogData()" type="primary" style="margin-left: 2px">{{'数据同步'}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
@ -1518,6 +1519,7 @@ |
|
|
|
qcSpecUpdate, |
|
|
|
qcSpecDelete, |
|
|
|
getQcSpecItemList, |
|
|
|
syncPartCatalog as syncPartCatalogApi, |
|
|
|
} from "@/api/qc/qc.js" |
|
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
@ -2341,11 +2343,13 @@ |
|
|
|
authDelete: false, |
|
|
|
authDetail: false, |
|
|
|
authFile: false, |
|
|
|
authSync: false, |
|
|
|
menuId: this.$route.meta.menuId, |
|
|
|
activeTable: 'bom', |
|
|
|
partCurrentRow: {}, |
|
|
|
secondHeight: 200, |
|
|
|
searchLoading: false, |
|
|
|
syncLoading: false, |
|
|
|
saveLoading: false, |
|
|
|
editBatchVisible: false, |
|
|
|
batchLoading: false, |
|
|
|
@ -3836,6 +3840,28 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
syncPartCatalogData () { |
|
|
|
this.$confirm('确定执行数据同步吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.syncLoading = true |
|
|
|
syncPartCatalogApi({site: '*'}).then(({data}) => { |
|
|
|
this.syncLoading = false |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success(data.msg || '数据同步成功') |
|
|
|
this.getDataList() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '数据同步失败') |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
this.syncLoading = false |
|
|
|
this.$message.error('数据同步失败:' + (err.message || '未知错误')) |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 导入 |
|
|
|
qcUpload () { |
|
|
|
let currentData = { |
|
|
|
@ -4242,6 +4268,7 @@ |
|
|
|
let deleteFlag = this.isAuth(this.menuId+":delete") |
|
|
|
let detailFlag = this.isAuth(this.menuId+":detail") |
|
|
|
let fileFlag = this.isAuth(this.menuId+":file") |
|
|
|
let syncFlag = this.isAuth(this.menuId+":sync") |
|
|
|
//处理页面的权限数据 |
|
|
|
this.authSearch = !searchFlag |
|
|
|
this.authSave = !saveFlag |
|
|
|
@ -4249,6 +4276,7 @@ |
|
|
|
this.authDelete = !deleteFlag |
|
|
|
this.authDetail = !detailFlag |
|
|
|
this.authFile = !fileFlag |
|
|
|
this.authSync = !syncFlag |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
|