|
|
|
|
@ -245,7 +245,7 @@
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.uploadOther.token = getToken();
|
|
|
|
|
this.getProductList()
|
|
|
|
|
// this.getProductList()
|
|
|
|
|
this.getApplicationList()
|
|
|
|
|
// this.getAppSpecial()
|
|
|
|
|
},
|
|
|
|
|
@ -302,7 +302,16 @@
|
|
|
|
|
page: this.productPage
|
|
|
|
|
})
|
|
|
|
|
this.lastPage = res.last_page
|
|
|
|
|
if(this.type==='editor'){
|
|
|
|
|
const uniqueB = res.data.filter(itemB =>
|
|
|
|
|
!this.form.product_numbers_details.some(itemC => itemC.id === itemB.id)
|
|
|
|
|
);
|
|
|
|
|
this.productList.push(...uniqueB)
|
|
|
|
|
}else{
|
|
|
|
|
this.productList.push(...res.data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
loadMore() {
|
|
|
|
|
// 这里写入要触发的方法
|
|
|
|
|
@ -349,8 +358,8 @@
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getDetail() {
|
|
|
|
|
show({
|
|
|
|
|
async getDetail() {
|
|
|
|
|
await show({
|
|
|
|
|
table_name: this.table_name,
|
|
|
|
|
id: this.id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
@ -364,6 +373,10 @@
|
|
|
|
|
this.form.separation_mode = res.separation_mode ? res.separation_mode : []
|
|
|
|
|
this.form.broad_sample_type = res.broad_sample_type ? res.broad_sample_type : []
|
|
|
|
|
this.form.specific_sample = res.specific_sample ? res.specific_sample : []
|
|
|
|
|
if(res.product_numbers_details && res.product_numbers_details.length>0){
|
|
|
|
|
this.productList.unshift(...res.product_numbers_details)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (res.files_details && res.files_details.length > 0) {
|
|
|
|
|
this.filesList = []
|
|
|
|
|
res.files_details.map(item => {
|
|
|
|
|
@ -382,8 +395,10 @@
|
|
|
|
|
if (newVal) {
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
this.getProductList()
|
|
|
|
|
} else {
|
|
|
|
|
this.form.date = this.$moment().format('YYYY-MM-DD HH:mm:ss')
|
|
|
|
|
this.getProductList()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
@ -391,6 +406,8 @@
|
|
|
|
|
this.filesList = []
|
|
|
|
|
this.showProgress = false;
|
|
|
|
|
this.uploadProgress = 0;
|
|
|
|
|
this.productList = []
|
|
|
|
|
this.productPage = 1
|
|
|
|
|
this.form = {
|
|
|
|
|
category_ids: [],
|
|
|
|
|
application_ids: [],
|
|
|
|
|
|