|
|
|
|
@ -8,10 +8,8 @@ |
|
|
|
|
v-model="form" |
|
|
|
|
v-model:page="page" |
|
|
|
|
ref="crud" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@ -20,9 +18,12 @@ |
|
|
|
|
<template #menu-left> </template> |
|
|
|
|
<template #menu-right> </template> |
|
|
|
|
<template #menu="{ row }"> |
|
|
|
|
<el-button type="text">完成</el-button> |
|
|
|
|
<el-button type="text">发送</el-button> |
|
|
|
|
<el-button type="text">车间订单生成</el-button> |
|
|
|
|
<!-- 石墨模准备完成 --> |
|
|
|
|
<el-button type="text" @click="moldComplete(scope.row.yoId)">完成</el-button> |
|
|
|
|
<!-- 齐套流转完成 --> |
|
|
|
|
<el-button type="text" @click="sendKit(scope.row.yoId)">发送</el-button> |
|
|
|
|
<!-- 车间订单生成 --> |
|
|
|
|
<el-button type="text" @click="orderGen(scope.row.yoId)">车间订单生成</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #heatTreat="scope"> |
|
|
|
|
@ -35,42 +36,17 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { |
|
|
|
|
add, |
|
|
|
|
getRole, |
|
|
|
|
getRoleAlias, |
|
|
|
|
getRoleTreeById, |
|
|
|
|
grant, |
|
|
|
|
grantTree, |
|
|
|
|
remove, |
|
|
|
|
update, |
|
|
|
|
} from '@/api/system/role'; |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { validatenull } from '@/utils/validate'; |
|
|
|
|
getList, |
|
|
|
|
moldComplete, |
|
|
|
|
sendKit, |
|
|
|
|
loadBigWmsSend, |
|
|
|
|
} from '@/api/productionManagement/sjKitPreparation'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
components: {}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
inBatchesOpen: false, |
|
|
|
|
platingSmallOpen: false, |
|
|
|
|
planOrderArr: [], |
|
|
|
|
isOpen: false, |
|
|
|
|
rowItem: {}, |
|
|
|
|
poId: null, |
|
|
|
|
form: {}, |
|
|
|
|
box: false, |
|
|
|
|
props: { |
|
|
|
|
label: 'title', |
|
|
|
|
value: 'key', |
|
|
|
|
}, |
|
|
|
|
menuGrantList: [], |
|
|
|
|
dataScopeGrantList: [], |
|
|
|
|
apiScopeGrantList: [], |
|
|
|
|
apiGrantList: [], |
|
|
|
|
menuTreeObj: [], |
|
|
|
|
dataScopeTreeObj: [], |
|
|
|
|
apiScopeTreeObj: [], |
|
|
|
|
selectionList: [], |
|
|
|
|
query: {}, |
|
|
|
|
loading: true, |
|
|
|
|
page: { |
|
|
|
|
@ -98,7 +74,7 @@ export default { |
|
|
|
|
delBtn: false, |
|
|
|
|
editBtnText: '修改', |
|
|
|
|
labelWidth: 120, |
|
|
|
|
menuWidth: 80, |
|
|
|
|
menuWidth: 100, |
|
|
|
|
dialogWidth: 900, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchEnter: true, |
|
|
|
|
@ -122,366 +98,206 @@ export default { |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: '配套人', |
|
|
|
|
prop: 'partCode', |
|
|
|
|
bind: 'dsPart.partCode', |
|
|
|
|
prop: 'pkUsername', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '配套时间', |
|
|
|
|
prop: 'partName', |
|
|
|
|
bind: 'dsPart.partName', |
|
|
|
|
prop: 'pkDate', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '计划单号', |
|
|
|
|
prop: 'cycle', |
|
|
|
|
prop: 'ypCode', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '生产单号', |
|
|
|
|
prop: 'material', |
|
|
|
|
bind: 'dsPart.material', |
|
|
|
|
prop: 'yoCode', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '零件号', |
|
|
|
|
prop: 'plate', |
|
|
|
|
bind: 'dsPart.plate', |
|
|
|
|
prop: 'partCode', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '批次号', |
|
|
|
|
prop: 'craftWay', |
|
|
|
|
bind: 'dsPart.craftWay', |
|
|
|
|
prop: 'batchNo', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '流程卡号', |
|
|
|
|
prop: 'chlidPart', |
|
|
|
|
prop: 'cardNo', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '产品型号', |
|
|
|
|
prop: 'remindContent', |
|
|
|
|
prop: 'productType', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '名称', |
|
|
|
|
prop: 'parameter', |
|
|
|
|
prop: 'partName', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '镀种', |
|
|
|
|
prop: 'metalsTest', |
|
|
|
|
prop: 'plate', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '生产标识', |
|
|
|
|
prop: 'silverTest', |
|
|
|
|
prop: 'productIdent', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
display: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '使用部门', |
|
|
|
|
prop: 'heatTreat', |
|
|
|
|
prop: 'useDept', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
type: 'switch', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '数量', |
|
|
|
|
prop: 'afterPlating', |
|
|
|
|
prop: 'ypQty', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '面积(d㎡)', |
|
|
|
|
prop: 'afterPlating', |
|
|
|
|
prop: 'ypArea', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '需求交期', |
|
|
|
|
prop: 'afterPlating', |
|
|
|
|
prop: 'demandDate', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '计划员', |
|
|
|
|
prop: 'afterPlating', |
|
|
|
|
prop: 'planUser', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '计划下达时间', |
|
|
|
|
prop: 'afterPlating', |
|
|
|
|
prop: 'releaseDate', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '流转编号', |
|
|
|
|
prop: 'afterPlating', |
|
|
|
|
prop: 'roamNo', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '备注', |
|
|
|
|
prop: 'afterPlating', |
|
|
|
|
prop: 'memo', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '状态', |
|
|
|
|
prop: 'afterPlating', |
|
|
|
|
prop: 'curStatusTitle', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
width: 150, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
data: [], |
|
|
|
|
isRushOpen: false, //加急弹框 |
|
|
|
|
isBatchOpen: false, //分批处理 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 车间订单生成 |
|
|
|
|
orderGen(cardNo) { |
|
|
|
|
this.$confirm('生成车间订单?', this.$t('global.tips'), { |
|
|
|
|
confirmButtonText: this.$t('global.confirm'), |
|
|
|
|
cancelButtonText: this.$t('global.cancle'), |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.$ajax |
|
|
|
|
.get('pdaLoad/loadBigWmsSend/' + cardNo + '/' + this.mark) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code === 0) { |
|
|
|
|
this.$message.success(this.$t('global.saveOk')); |
|
|
|
|
this.cancel(true); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.$message.info('已取消'); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 完成 |
|
|
|
|
moldComplete(yoId) { |
|
|
|
|
this.$confirm('模具准备完成?', this.$t('global.tips'), { |
|
|
|
|
confirmButtonText: this.$t('global.confirm'), |
|
|
|
|
cancelButtonText: this.$t('global.cancle'), |
|
|
|
|
this.$confirm('模具准备完成?', '提示', { |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.$ajax |
|
|
|
|
.post('pjYieldOrder/moldComplete', { |
|
|
|
|
yoId: yoId, |
|
|
|
|
}) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code === 0) { |
|
|
|
|
this.$message.success(this.$t('global.saveOk')); |
|
|
|
|
this.cancel(true); |
|
|
|
|
} |
|
|
|
|
moldComplete({ yoId: yoId }).then(res => { |
|
|
|
|
this.$message.success('操作成功'); |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.$message.info('已取消'); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 批量接收 |
|
|
|
|
batchReceiving() { |
|
|
|
|
this.$confirm('确定将选择数据批量接收?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
// 发送 |
|
|
|
|
sendKit(yoId) { |
|
|
|
|
this.$confirm('发送至待生成车间订单?', '提示', { |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
// return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
// this.$message({ |
|
|
|
|
// type: 'success', |
|
|
|
|
// message: '操作成功!', |
|
|
|
|
// }); |
|
|
|
|
sendKit({ yoId: yoId }).then(res => { |
|
|
|
|
this.$message.success('操作成功'); |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 批量关闭 |
|
|
|
|
batchDel() { |
|
|
|
|
this.$confirm('确定将选择数据批量删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
// return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
// this.$message({ |
|
|
|
|
// type: 'success', |
|
|
|
|
// message: '操作成功!', |
|
|
|
|
// }); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 加急 |
|
|
|
|
rushFn() { |
|
|
|
|
this.isRushOpen = true; |
|
|
|
|
}, |
|
|
|
|
closeDialog() { |
|
|
|
|
this.isRushOpen = false; |
|
|
|
|
this.isBatchOpen = false; |
|
|
|
|
}, |
|
|
|
|
inBatchesFn(row) { |
|
|
|
|
this.rowItem = row; |
|
|
|
|
this.isBatchOpen = true; |
|
|
|
|
}, |
|
|
|
|
subclass() { |
|
|
|
|
this.platingSmallOpen = true; |
|
|
|
|
}, |
|
|
|
|
lookProcessRoute(row) { |
|
|
|
|
this.isOpen = true; |
|
|
|
|
this.rowItem = row; |
|
|
|
|
}, |
|
|
|
|
cancel(refresh) { |
|
|
|
|
if (refresh) { |
|
|
|
|
this.$refs.myTable.load(); |
|
|
|
|
} |
|
|
|
|
this.inBatchesOpen = false; |
|
|
|
|
this.isOpen = false; |
|
|
|
|
this.planFormOpen = false; |
|
|
|
|
this.platingSmallOpen = false; |
|
|
|
|
}, |
|
|
|
|
initData(roleId) { |
|
|
|
|
getRoleTreeById(roleId).then(res => { |
|
|
|
|
const column = this.findObject(this.option.column, 'parentId'); |
|
|
|
|
column.dicData = res.data.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
submit() { |
|
|
|
|
const menuList = this.$refs.treeMenu.getCheckedKeys(); |
|
|
|
|
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys(); |
|
|
|
|
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys(); |
|
|
|
|
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowSave(row, done, loading) { |
|
|
|
|
add(row).then( |
|
|
|
|
() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
window.console.log(error); |
|
|
|
|
loading(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
update(row).then( |
|
|
|
|
() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
.catch(() => { |
|
|
|
|
this.$message.info('已取消'); |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
window.console.log(error); |
|
|
|
|
loading(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
rowDel(row) { |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
// 车间订单生成 |
|
|
|
|
orderGen(cardNo) { |
|
|
|
|
this.$confirm('生成车间订单?', '提示', { |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
loadBigWmsSend().then(res => { |
|
|
|
|
this.$message.success('操作成功'); |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.$message.info('已取消'); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
this.query = params; |
|
|
|
|
@ -489,118 +305,27 @@ export default { |
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
selectionChange(list) { |
|
|
|
|
this.selectionList = list; |
|
|
|
|
}, |
|
|
|
|
selectionClear() { |
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
}, |
|
|
|
|
beforeOpen(done, type) { |
|
|
|
|
if (['add', 'edit'].includes(type)) { |
|
|
|
|
this.initData(this.form.id); |
|
|
|
|
} |
|
|
|
|
if (['edit', 'view'].includes(type)) { |
|
|
|
|
if (this.form.parentId === '0') { |
|
|
|
|
this.form.parentId = ''; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
getRoleAlias().then(res => { |
|
|
|
|
const column = this.findObject(this.option.column, 'currentAlias'); |
|
|
|
|
column.dicData = res.data.data; |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
handleRole() { |
|
|
|
|
if (this.selectionList.length !== 1) { |
|
|
|
|
this.$message.warning('只能选择一条数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.menuTreeObj = []; |
|
|
|
|
this.dataScopeTreeObj = []; |
|
|
|
|
this.apiScopeTreeObj = []; |
|
|
|
|
grantTree().then(res => { |
|
|
|
|
this.menuGrantList = res.data.data.menu; |
|
|
|
|
this.dataScopeGrantList = res.data.data.dataScope; |
|
|
|
|
this.apiScopeGrantList = res.data.data.apiScope; |
|
|
|
|
getRole(this.ids).then(res => { |
|
|
|
|
this.menuTreeObj = res.data.data.menu; |
|
|
|
|
this.dataScopeTreeObj = res.data.data.dataScope; |
|
|
|
|
this.apiScopeTreeObj = res.data.data.apiScope; |
|
|
|
|
this.box = true; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleRowRole(row) { |
|
|
|
|
this.menuTreeObj = []; |
|
|
|
|
this.dataScopeTreeObj = []; |
|
|
|
|
this.apiScopeTreeObj = []; |
|
|
|
|
grantTree().then(res => { |
|
|
|
|
this.menuGrantList = res.data.data.menu; |
|
|
|
|
this.dataScopeGrantList = res.data.data.dataScope; |
|
|
|
|
this.apiScopeGrantList = res.data.data.apiScope; |
|
|
|
|
getRole(row.id).then(res => { |
|
|
|
|
this.menuTreeObj = res.data.data.menu; |
|
|
|
|
this.dataScopeTreeObj = res.data.data.dataScope; |
|
|
|
|
this.apiScopeTreeObj = res.data.data.apiScope; |
|
|
|
|
this.selectionList.push(row); |
|
|
|
|
this.box = true; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDelete() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return remove(this.ids); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
currentChange(currentPage) { |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
sizeChange(pageSize) { |
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
handleChange(file, fileList) { |
|
|
|
|
// proxy.$Export.xlsx(file.raw).then((data) => { |
|
|
|
|
// data.value = data.results; |
|
|
|
|
// }); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.data = []; |
|
|
|
|
this.page.total = this.data.length; |
|
|
|
|
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
|
|
|
|
// this.data = res.data.data.records; |
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
|
|
|
|
this.data = res.data.data.records; |
|
|
|
|
this.loading = false; |
|
|
|
|
// this.page.total = res.data.data.total |
|
|
|
|
// this.selectionClear(); |
|
|
|
|
// }); |
|
|
|
|
this.page.total = res.data.data.total; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
mounted() {}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|