parent
8ee0e7b255
commit
baff048dec
3 changed files with 481 additions and 441 deletions
@ -1,446 +1,481 @@ |
|||||||
|
|
||||||
<template> |
<template> |
||||||
<basic-container> |
<basic-container> |
||||||
<el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange"> |
<el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange"> |
||||||
<el-tab-pane label="erp审理" name="erpHear"> |
<el-tab-pane label="erp审理" name="erpHear"> </el-tab-pane> |
||||||
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" |
<el-tab-pane label="内部审理" name="insideHear"> </el-tab-pane> |
||||||
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" |
</el-tabs> |
||||||
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
<div v-if="tabPosition == 'erpHear'"> |
||||||
@refresh-change="refreshChange" @on-load="onLoad"> |
<avue-crud |
||||||
<template #menu-left> |
:option="option" |
||||||
</template> |
:table-loading="loading" |
||||||
<template #menu-right> |
:data="data" |
||||||
</template> |
v-model="form" |
||||||
<template #menu="{ row }"> |
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" |
||||||
|
@on-load="onLoad" |
||||||
|
> |
||||||
|
<template #menu-left> </template> |
||||||
|
<template #menu-right> </template> |
||||||
|
<template #menu="{ row }"> </template> |
||||||
|
|
||||||
</template> |
<template #heatTreat="scope"> |
||||||
|
<el-tag v-if="scope.row.afterPlating" type="success">是</el-tag> |
||||||
|
<el-tag v-else type="warning">否</el-tag> |
||||||
|
</template> |
||||||
|
</avue-crud> |
||||||
|
</div> |
||||||
|
<div v-if="tabPosition == 'insideHear'"> |
||||||
|
<avue-crud |
||||||
|
:option="insideOption" |
||||||
|
:table-loading="loading" |
||||||
|
:data="insideData" |
||||||
|
v-model="form" |
||||||
|
v-model:page="insidePage" |
||||||
|
ref="crud" |
||||||
|
@row-del="rowDel" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@selection-change="selectionChange" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
@on-load="onLoad" |
||||||
|
> |
||||||
|
<template #menu-left> </template> |
||||||
|
<template #menu-right> </template> |
||||||
|
<template #qty="{ row }"> |
||||||
|
<span v-if="row.bizType == 1">{{ row.reDoNum }}</span> |
||||||
|
<span v-if="row.bizType == 2">{{ row.scrapNum }}</span> |
||||||
|
</template> |
||||||
|
<template #menu="{ row }"> |
||||||
|
<el-button |
||||||
|
type="text" |
||||||
|
@click="reviewFn(row)" |
||||||
|
v-if="row.selfReviewFlag != 1 && row.selfReviewFlag != 2" |
||||||
|
>审理</el-button |
||||||
|
> |
||||||
|
</template> |
||||||
|
</avue-crud> |
||||||
|
</div> |
||||||
|
|
||||||
<template #heatTreat="scope"> |
<reviewDialog |
||||||
<el-tag v-if="scope.row.afterPlating" type="success">是</el-tag> |
v-if="isReviewOpen" |
||||||
<el-tag v-else type="warning">否</el-tag> |
:id="checkId" |
||||||
</template> |
:showDialog="isReviewOpen" |
||||||
</avue-crud> |
@closeDialog="closeDialog" |
||||||
</el-tab-pane> |
></reviewDialog> |
||||||
<el-tab-pane label="内部审理" name="insideHear"> |
</basic-container> |
||||||
<avue-crud :option="insideOption" :table-loading="loading" :data="insideData" v-model="form" v-model:page="insidePage" ref="crud" |
|
||||||
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" |
|
||||||
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
||||||
@refresh-change="refreshChange" @on-load="onLoad"> |
|
||||||
<template #menu-left> |
|
||||||
</template> |
|
||||||
<template #menu-right> |
|
||||||
</template> |
|
||||||
<template #qty="{row}"> |
|
||||||
<span v-if="row.bizType == 1">{{row.reDoNum}}</span> |
|
||||||
<span v-if="row.bizType == 2">{{row.scrapNum}}</span> |
|
||||||
</template> |
|
||||||
<template #menu="{ row }"> |
|
||||||
<el-button type="text" @click="reviewFn(row)" v-if="row.selfReviewFlag != 1 && row.selfReviewFlag != 2">审理</el-button> |
|
||||||
</template> |
|
||||||
|
|
||||||
</avue-crud> |
|
||||||
</el-tab-pane> |
|
||||||
</el-tabs> |
|
||||||
|
|
||||||
<reviewDialog v-if="isReviewOpen" :id="checkId" :showDialog="isReviewOpen" @closeDialog="closeDialog"></reviewDialog> |
|
||||||
|
|
||||||
</basic-container> |
|
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
import reviewDialog from "@/views/qualityManagement/reworkOrderReview/components/reviewDialog.vue" |
import reviewDialog from '@/views/qualityManagement/reworkOrderReview/components/reviewDialog.vue'; |
||||||
import { |
import { |
||||||
add, |
add, |
||||||
getRole, |
getRole, |
||||||
getRoleAlias, |
getRoleAlias, |
||||||
getRoleTreeById, |
getRoleTreeById, |
||||||
grant, |
grant, |
||||||
grantTree, |
grantTree, |
||||||
remove, |
remove, |
||||||
update, |
update, |
||||||
} from '@/api/system/role'; |
} from '@/api/system/role'; |
||||||
import { mapGetters } from 'vuex'; |
import { mapGetters } from 'vuex'; |
||||||
import { validatenull } from '@/utils/validate'; |
import { validatenull } from '@/utils/validate'; |
||||||
import {insideOption,erpOption} from './options' |
import { insideOption, erpOption } from './options'; |
||||||
import {getInnerReviewList,getErpReviewList} from "@/api/qualityManagement/productionTesting/reviewFormMess" |
import { |
||||||
|
getInnerReviewList, |
||||||
|
getErpReviewList, |
||||||
|
} from '@/api/qualityManagement/productionTesting/reviewFormMess'; |
||||||
|
|
||||||
export default { |
export default { |
||||||
components: { |
components: { |
||||||
reviewDialog |
reviewDialog, |
||||||
}, |
}, |
||||||
data() { |
data() { |
||||||
return { |
return { |
||||||
checkId:'', |
checkId: '', |
||||||
insideQuery:{}, |
insideQuery: {}, |
||||||
isReviewOpen:false, |
isReviewOpen: false, |
||||||
tabPosition:'erpHear', |
tabPosition: 'erpHear', |
||||||
inBatchesOpen: false, |
inBatchesOpen: false, |
||||||
platingSmallOpen: false, |
platingSmallOpen: false, |
||||||
planOrderArr: [], |
planOrderArr: [], |
||||||
isOpen: false, |
isOpen: false, |
||||||
rowItem: {}, |
rowItem: {}, |
||||||
poId: null, |
poId: null, |
||||||
form: {}, |
form: {}, |
||||||
box: false, |
box: false, |
||||||
props: { |
props: { |
||||||
label: 'title', |
label: 'title', |
||||||
value: 'key', |
value: 'key', |
||||||
}, |
}, |
||||||
menuGrantList: [], |
menuGrantList: [], |
||||||
dataScopeGrantList: [], |
dataScopeGrantList: [], |
||||||
apiScopeGrantList: [], |
apiScopeGrantList: [], |
||||||
apiGrantList: [], |
apiGrantList: [], |
||||||
menuTreeObj: [], |
menuTreeObj: [], |
||||||
dataScopeTreeObj: [], |
dataScopeTreeObj: [], |
||||||
apiScopeTreeObj: [], |
apiScopeTreeObj: [], |
||||||
selectionList: [], |
selectionList: [], |
||||||
query: {}, |
query: {}, |
||||||
loading: true, |
loading: true, |
||||||
page: { |
page: { |
||||||
pageSize: 10, |
pageSize: 10, |
||||||
currentPage: 1, |
currentPage: 1, |
||||||
total: 0, |
total: 0, |
||||||
}, |
}, |
||||||
option: erpOption, |
option: erpOption, |
||||||
insideOption:insideOption, |
insideOption: insideOption, |
||||||
|
|
||||||
data: [], |
data: [], |
||||||
isRushOpen: false,//加急弹框 |
isRushOpen: false, //加急弹框 |
||||||
isBatchOpen: false,//分批处理 |
isBatchOpen: false, //分批处理 |
||||||
insideData:[], |
insideData: [], |
||||||
insidePage:{ |
insidePage: { |
||||||
pageSize: 10, |
pageSize: 10, |
||||||
currentPage: 1, |
currentPage: 1, |
||||||
total: 0, |
total: 0, |
||||||
} |
}, |
||||||
}; |
}; |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
tabPositionChange(val) { |
||||||
|
this.tabPosition = val; |
||||||
|
if (this.tabPosition == 'erpHear') { |
||||||
|
this.getErpList(); |
||||||
|
} else if (this.tabPosition == 'insideHear') { |
||||||
|
this.getInsideList(); |
||||||
|
} |
||||||
}, |
}, |
||||||
methods: { |
reviewFn(row) { |
||||||
tabPositionChange(val){ |
this.checkId = row.id; |
||||||
this.tabPosition = val |
this.isReviewOpen = true; |
||||||
if(this.tabPosition == 'erpHear'){ |
}, |
||||||
this.getErpList() |
getErpList() { |
||||||
}else if(this.tabPosition == 'insideHear'){ |
this.loading = true; |
||||||
this.getInsideList() |
getErpReviewList({ |
||||||
} |
current: this.page.currentPage, |
||||||
}, |
size: this.page.pageSize, |
||||||
reviewFn(row){ |
...this.query, |
||||||
this.checkId = row.id |
}).then(res => { |
||||||
this.isReviewOpen = true |
this.data = res.data.data.records; |
||||||
}, |
this.page.total = res.data.data.total; |
||||||
getErpList(){ |
this.loading = false; |
||||||
this.loading = true; |
}); |
||||||
getErpReviewList({ |
}, |
||||||
current:this.page.currentPage, |
getInsideList() { |
||||||
size:this.page.pageSize, |
this.loading = true; |
||||||
...this.query |
if (this.insideQuery.crDate) { |
||||||
}).then(res =>{ |
delete this.insideQuery.crDate; |
||||||
this.data = res.data.data.records |
} |
||||||
this.page.total = res.data.data.total |
if (this.insideQuery.reviewDate) { |
||||||
this.loading = false |
delete this.insideQuery.reviewDate; |
||||||
}) |
} |
||||||
}, |
getInnerReviewList({ |
||||||
getInsideList(){ |
current: this.insidePage.currentPage, |
||||||
if(this.insideQuery.crDate){ |
size: this.insidePage.pageSize, |
||||||
delete this.insideQuery.crDate |
// bizType:0, |
||||||
} |
...this.insideQuery, |
||||||
if(this.insideQuery.reviewDate){ |
}).then(res => { |
||||||
delete this.insideQuery.reviewDate |
this.loading = false; |
||||||
} |
this.insideData = res.data.data.records; |
||||||
getInnerReviewList({ |
this.insidePage.total = res.data.data.total; |
||||||
current:this.insidePage.currentPage, |
}); |
||||||
size:this.insidePage.pageSize, |
}, |
||||||
// bizType:0, |
// 批量接收 |
||||||
...this.insideQuery |
batchReceiving() { |
||||||
}).then(res =>{ |
this.$confirm('确定将选择数据批量接收?', { |
||||||
this.insideData = res.data.data.records |
confirmButtonText: '确定', |
||||||
this.insidePage.total = res.data.data.total |
cancelButtonText: '取消', |
||||||
}) |
type: 'warning', |
||||||
}, |
}) |
||||||
// 批量接收 |
.then(() => { |
||||||
batchReceiving() { |
// return remove(row.id); |
||||||
this.$confirm('确定将选择数据批量接收?', { |
}) |
||||||
confirmButtonText: '确定', |
.then(() => { |
||||||
cancelButtonText: '取消', |
// this.onLoad(this.page); |
||||||
type: 'warning', |
// this.$message({ |
||||||
}) |
// type: 'success', |
||||||
.then(() => { |
// message: '操作成功!', |
||||||
// return remove(row.id); |
// }); |
||||||
}) |
}); |
||||||
.then(() => { |
}, |
||||||
// this.onLoad(this.page); |
// 批量关闭 |
||||||
// this.$message({ |
batchDel() { |
||||||
// type: 'success', |
this.$confirm('确定将选择数据批量删除?', { |
||||||
// message: '操作成功!', |
confirmButtonText: '确定', |
||||||
// }); |
cancelButtonText: '取消', |
||||||
}); |
type: 'warning', |
||||||
}, |
}) |
||||||
// 批量关闭 |
.then(() => { |
||||||
batchDel() { |
// return remove(row.id); |
||||||
this.$confirm('确定将选择数据批量删除?', { |
}) |
||||||
confirmButtonText: '确定', |
.then(() => { |
||||||
cancelButtonText: '取消', |
// this.onLoad(this.page); |
||||||
type: 'warning', |
// this.$message({ |
||||||
}) |
// type: 'success', |
||||||
.then(() => { |
// message: '操作成功!', |
||||||
// return remove(row.id); |
// }); |
||||||
}) |
}); |
||||||
.then(() => { |
}, |
||||||
// this.onLoad(this.page); |
// 加急 |
||||||
// this.$message({ |
rushFn() { |
||||||
// type: 'success', |
this.isRushOpen = true; |
||||||
// message: '操作成功!', |
}, |
||||||
// }); |
closeDialog(val) { |
||||||
}); |
this.isRushOpen = false; |
||||||
}, |
this.isBatchOpen = false; |
||||||
// 加急 |
this.isReviewOpen = false; |
||||||
rushFn() { |
if (val) { |
||||||
this.isRushOpen = true |
this.tabPositionChange('insideHear'); |
||||||
}, |
} |
||||||
closeDialog(val) { |
}, |
||||||
this.isRushOpen = false |
inBatchesFn(row) { |
||||||
this.isBatchOpen = false |
this.rowItem = row; |
||||||
this.isReviewOpen = false |
this.isBatchOpen = true; |
||||||
if(val){ |
}, |
||||||
this.tabPositionChange('insideHear') |
subclass() { |
||||||
} |
this.platingSmallOpen = true; |
||||||
}, |
}, |
||||||
inBatchesFn(row) { |
lookProcessRoute(row) { |
||||||
this.rowItem = row; |
this.isOpen = true; |
||||||
this.isBatchOpen = true; |
this.rowItem = row; |
||||||
}, |
}, |
||||||
subclass() { |
cancel(refresh) { |
||||||
this.platingSmallOpen = true; |
if (refresh) { |
||||||
}, |
this.$refs.myTable.load(); |
||||||
lookProcessRoute(row) { |
} |
||||||
this.isOpen = true; |
this.inBatchesOpen = false; |
||||||
this.rowItem = row; |
this.isOpen = false; |
||||||
}, |
this.planFormOpen = false; |
||||||
cancel(refresh) { |
this.platingSmallOpen = false; |
||||||
if (refresh) { |
}, |
||||||
this.$refs.myTable.load(); |
initData(roleId) { |
||||||
} |
getRoleTreeById(roleId).then(res => { |
||||||
this.inBatchesOpen = false; |
const column = this.findObject(this.option.column, 'parentId'); |
||||||
this.isOpen = false; |
column.dicData = res.data.data; |
||||||
this.planFormOpen = false; |
}); |
||||||
this.platingSmallOpen = false; |
}, |
||||||
}, |
submit() { |
||||||
initData(roleId) { |
const menuList = this.$refs.treeMenu.getCheckedKeys(); |
||||||
getRoleTreeById(roleId).then(res => { |
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys(); |
||||||
const column = this.findObject(this.option.column, 'parentId'); |
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys(); |
||||||
column.dicData = res.data.data; |
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => { |
||||||
}); |
this.box = false; |
||||||
}, |
this.$message({ |
||||||
submit() { |
type: 'success', |
||||||
const menuList = this.$refs.treeMenu.getCheckedKeys(); |
message: '操作成功!', |
||||||
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys(); |
}); |
||||||
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys(); |
this.selectionList = []; |
||||||
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => { |
this.onLoad(this.page); |
||||||
this.box = false; |
}); |
||||||
this.$message({ |
}, |
||||||
type: 'success', |
rowSave(row, done, loading) { |
||||||
message: '操作成功!', |
add(row).then( |
||||||
}); |
() => { |
||||||
this.selectionList = []; |
this.onLoad(this.page); |
||||||
this.onLoad(this.page); |
this.$message({ |
||||||
}); |
type: 'success', |
||||||
}, |
message: '操作成功!', |
||||||
rowSave(row, done, loading) { |
}); |
||||||
add(row).then( |
done(); |
||||||
() => { |
|
||||||
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: '操作成功!', |
|
||||||
}); |
|
||||||
done(); |
|
||||||
}, |
|
||||||
error => { |
|
||||||
window.console.log(error); |
|
||||||
loading(); |
|
||||||
} |
|
||||||
); |
|
||||||
}, |
}, |
||||||
rowDel(row) { |
error => { |
||||||
this.$confirm('确定将选择数据删除?', { |
window.console.log(error); |
||||||
confirmButtonText: '确定', |
loading(); |
||||||
cancelButtonText: '取消', |
} |
||||||
type: 'warning', |
); |
||||||
}) |
}, |
||||||
.then(() => { |
rowUpdate(row, index, done, loading) { |
||||||
return remove(row.id); |
update(row).then( |
||||||
}) |
() => { |
||||||
.then(() => { |
this.onLoad(this.page); |
||||||
this.onLoad(this.page); |
this.$message({ |
||||||
this.$message({ |
type: 'success', |
||||||
type: 'success', |
message: '操作成功!', |
||||||
message: '操作成功!', |
}); |
||||||
}); |
done(); |
||||||
}); |
|
||||||
}, |
}, |
||||||
|
error => { |
||||||
|
window.console.log(error); |
||||||
|
loading(); |
||||||
|
} |
||||||
|
); |
||||||
|
}, |
||||||
|
rowDel(row) { |
||||||
|
this.$confirm('确定将选择数据删除?', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
return remove(row.id); |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
this.onLoad(this.page); |
||||||
|
this.$message({ |
||||||
|
type: 'success', |
||||||
|
message: '操作成功!', |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
searchReset() { |
searchReset() { |
||||||
if(this.tabPosition == 'erpHear'){ |
if (this.tabPosition == 'erpHear') { |
||||||
this.query = {} |
this.query = {}; |
||||||
this.getErpList() |
this.getErpList(); |
||||||
}else if(this.tabPosition == 'insideHear'){ |
} else if (this.tabPosition == 'insideHear') { |
||||||
this.insideQuery = {} |
this.insideQuery = {}; |
||||||
this.getInsideList() |
this.getInsideList(); |
||||||
} |
} |
||||||
// this.query = {}; |
// this.query = {}; |
||||||
// this.onLoad(this.page); |
// this.onLoad(this.page); |
||||||
}, |
}, |
||||||
searchChange(params, done) { |
searchChange(params, done) { |
||||||
console.log('tab---------',this.tabPosition) |
console.log('tab---------', this.tabPosition); |
||||||
if(this.tabPosition == 'erpHear'){ |
if (this.tabPosition == 'erpHear') { |
||||||
this.query = params; |
this.query = params; |
||||||
this.page.currentPage = 1; |
this.page.currentPage = 1; |
||||||
this.getErpList(); |
this.getErpList(); |
||||||
done(); |
done(); |
||||||
}else if(this.tabPosition == 'insideHear'){ |
} else if (this.tabPosition == 'insideHear') { |
||||||
this.insideQuery = params; |
this.insideQuery = params; |
||||||
this.insideQuery.createTimeStart = params.crDate && params.crDate.length != 0 && params.crDate[0] |
this.insideQuery.createTimeStart = |
||||||
this.insideQuery.createTimeEnd = params.crDate && params.crDate.length != 0 && params.crDate[1] |
params.crDate && params.crDate.length != 0 && params.crDate[0]; |
||||||
this.insideQuery.reviewTimeStart = params.reviewDate && params.reviewDate.length != 0 && params.reviewDate[1] |
this.insideQuery.createTimeEnd = |
||||||
this.insideQuery.reviewTimeEnd = params.reviewDate && params.reviewDate.length != 0 && params.reviewDate[1] |
params.crDate && params.crDate.length != 0 && params.crDate[1]; |
||||||
this.insidePage.currentPage = 1; |
this.insideQuery.reviewTimeStart = |
||||||
this.getInsideList(); |
params.reviewDate && params.reviewDate.length != 0 && params.reviewDate[1]; |
||||||
done(); |
this.insideQuery.reviewTimeEnd = |
||||||
} |
params.reviewDate && params.reviewDate.length != 0 && params.reviewDate[1]; |
||||||
|
this.insidePage.currentPage = 1; |
||||||
}, |
this.getInsideList(); |
||||||
selectionChange(list) { |
done(); |
||||||
this.selectionList = list; |
} |
||||||
}, |
}, |
||||||
selectionClear() { |
selectionChange(list) { |
||||||
this.selectionList = []; |
this.selectionList = list; |
||||||
this.$refs.crud.toggleSelection(); |
}, |
||||||
}, |
selectionClear() { |
||||||
beforeOpen(done, type) { |
this.selectionList = []; |
||||||
if (['add', 'edit'].includes(type)) { |
this.$refs.crud.toggleSelection(); |
||||||
this.initData(this.form.id); |
}, |
||||||
} |
beforeOpen(done, type) { |
||||||
if (['edit', 'view'].includes(type)) { |
if (['add', 'edit'].includes(type)) { |
||||||
if (this.form.parentId === '0') { |
this.initData(this.form.id); |
||||||
this.form.parentId = ''; |
} |
||||||
} |
if (['edit', 'view'].includes(type)) { |
||||||
} |
if (this.form.parentId === '0') { |
||||||
getRoleAlias().then(res => { |
this.form.parentId = ''; |
||||||
const column = this.findObject(this.option.column, 'currentAlias'); |
} |
||||||
column.dicData = res.data.data; |
} |
||||||
}); |
getRoleAlias().then(res => { |
||||||
done(); |
const column = this.findObject(this.option.column, 'currentAlias'); |
||||||
}, |
column.dicData = res.data.data; |
||||||
handleRole() { |
}); |
||||||
if (this.selectionList.length !== 1) { |
done(); |
||||||
this.$message.warning('只能选择一条数据'); |
}, |
||||||
return; |
handleRole() { |
||||||
} |
if (this.selectionList.length !== 1) { |
||||||
this.menuTreeObj = []; |
this.$message.warning('只能选择一条数据'); |
||||||
this.dataScopeTreeObj = []; |
return; |
||||||
this.apiScopeTreeObj = []; |
} |
||||||
grantTree().then(res => { |
this.menuTreeObj = []; |
||||||
this.menuGrantList = res.data.data.menu; |
this.dataScopeTreeObj = []; |
||||||
this.dataScopeGrantList = res.data.data.dataScope; |
this.apiScopeTreeObj = []; |
||||||
this.apiScopeGrantList = res.data.data.apiScope; |
grantTree().then(res => { |
||||||
getRole(this.ids).then(res => { |
this.menuGrantList = res.data.data.menu; |
||||||
this.menuTreeObj = res.data.data.menu; |
this.dataScopeGrantList = res.data.data.dataScope; |
||||||
this.dataScopeTreeObj = res.data.data.dataScope; |
this.apiScopeGrantList = res.data.data.apiScope; |
||||||
this.apiScopeTreeObj = res.data.data.apiScope; |
getRole(this.ids).then(res => { |
||||||
this.box = true; |
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 = []; |
handleRowRole(row) { |
||||||
grantTree().then(res => { |
this.menuTreeObj = []; |
||||||
this.menuGrantList = res.data.data.menu; |
this.dataScopeTreeObj = []; |
||||||
this.dataScopeGrantList = res.data.data.dataScope; |
this.apiScopeTreeObj = []; |
||||||
this.apiScopeGrantList = res.data.data.apiScope; |
grantTree().then(res => { |
||||||
getRole(row.id).then(res => { |
this.menuGrantList = res.data.data.menu; |
||||||
this.menuTreeObj = res.data.data.menu; |
this.dataScopeGrantList = res.data.data.dataScope; |
||||||
this.dataScopeTreeObj = res.data.data.dataScope; |
this.apiScopeGrantList = res.data.data.apiScope; |
||||||
this.apiScopeTreeObj = res.data.data.apiScope; |
getRole(row.id).then(res => { |
||||||
this.selectionList.push(row); |
this.menuTreeObj = res.data.data.menu; |
||||||
this.box = true; |
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; |
handleDelete() { |
||||||
} |
if (this.selectionList.length === 0) { |
||||||
this.$confirm('确定将选择数据删除?', { |
this.$message.warning('请选择至少一条数据'); |
||||||
confirmButtonText: '确定', |
return; |
||||||
cancelButtonText: '取消', |
} |
||||||
type: 'warning', |
this.$confirm('确定将选择数据删除?', { |
||||||
}) |
confirmButtonText: '确定', |
||||||
.then(() => { |
cancelButtonText: '取消', |
||||||
return remove(this.ids); |
type: 'warning', |
||||||
}) |
}) |
||||||
.then(() => { |
.then(() => { |
||||||
this.onLoad(this.page); |
return remove(this.ids); |
||||||
this.$message({ |
}) |
||||||
type: 'success', |
.then(() => { |
||||||
message: '操作成功!', |
this.onLoad(this.page); |
||||||
}); |
this.$message({ |
||||||
this.$refs.crud.toggleSelection(); |
type: 'success', |
||||||
}); |
message: '操作成功!', |
||||||
}, |
}); |
||||||
currentChange(currentPage) { |
this.$refs.crud.toggleSelection(); |
||||||
this.page.currentPage = currentPage; |
}); |
||||||
}, |
}, |
||||||
sizeChange(pageSize) { |
currentChange(currentPage) { |
||||||
this.page.pageSize = pageSize; |
this.page.currentPage = currentPage; |
||||||
}, |
}, |
||||||
refreshChange() { |
sizeChange(pageSize) { |
||||||
this.onLoad(this.page, this.query); |
this.page.pageSize = pageSize; |
||||||
}, |
}, |
||||||
handleChange(file, fileList) { |
refreshChange() { |
||||||
// proxy.$Export.xlsx(file.raw).then((data) => { |
this.onLoad(this.page, this.query); |
||||||
// data.value = data.results; |
}, |
||||||
// }); |
handleChange(file, fileList) { |
||||||
this.$message({ |
// proxy.$Export.xlsx(file.raw).then((data) => { |
||||||
type: 'success', |
// data.value = data.results; |
||||||
message: '操作成功!', |
// }); |
||||||
}); |
this.$message({ |
||||||
}, |
type: 'success', |
||||||
|
message: '操作成功!', |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
onLoad(page, params = {}) { |
onLoad(page, params = {}) { |
||||||
this.getErpList() |
this.getErpList(); |
||||||
// this.loading = true; |
// this.loading = true; |
||||||
// this.data = [ |
// this.data = [ |
||||||
|
|
||||||
// ] |
// ] |
||||||
// this.page.total = this.data.length |
// this.page.total = this.data.length |
||||||
// // getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
// // getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
||||||
// // this.data = res.data.data.records; |
// // this.data = res.data.data.records; |
||||||
// this.loading = false; |
// this.loading = false; |
||||||
// // this.page.total = res.data.data.total |
// // this.page.total = res.data.data.total |
||||||
// // this.selectionClear(); |
// // this.selectionClear(); |
||||||
// // }); |
// // }); |
||||||
}, |
|
||||||
}, |
}, |
||||||
mounted() { |
}, |
||||||
} |
mounted() {}, |
||||||
}; |
}; |
||||||
</script> |
</script> |
||||||
|
|||||||
Loading…
Reference in new issue