质量缺陷修复

dev-scheduling
jinna 3 weeks ago
parent 8ee0e7b255
commit baff048dec
  1. 9
      src/views/productionTesting/prPlanTestRec.vue
  2. 32
      src/views/productionTesting/productionQuality.vue
  3. 881
      src/views/qualityManagement/reviewFormMess/index.vue

@ -66,7 +66,7 @@ export default {
labelWidth: 120, labelWidth: 120,
searchLabelWidth: 120, searchLabelWidth: 120,
menu: true, menu: true,
menuWidth: 120, menuWidth: 80,
dialogWidth: 1200, dialogWidth: 1200,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -81,13 +81,14 @@ export default {
searchLabelPosition:'left', searchLabelPosition:'left',
searchGutter:24, searchGutter:24,
searchSpan:6, searchSpan:6,
menuAlign: 'left', menuAlign: 'center',
gridBtn:false, gridBtn:false,
searchMenuPosition:'right', searchMenuPosition:'right',
column: [ column: [
{ {
label: '流程卡号', label: '流程卡号',
prop: 'cardNo', prop:"code",
// prop: 'cardNo',
// bind: 'prWorkPlan.prWorkOrder.cardNo', // bind: 'prWorkPlan.prWorkOrder.cardNo',
width: 200, width: 200,
search: true, search: true,
@ -103,7 +104,7 @@ export default {
}, },
{ {
label: '转试人', label: '转试人',
prop: 'testUserRealName', prop: 'testUserName',
// bind: 'testUser.userName', // bind: 'testUser.userName',
width: 200, width: 200,
search: false, search: false,

@ -165,24 +165,28 @@
circle circle
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
@click="removeRules(scope.row.wpItemDetailList,subScope.$index, subScope.row)" @click="removeRules(scope.row.wpItemDetailList,subScope.$index, scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="镀前镀后" prop="testType" align="center"> <el-table-column label="镀前镀后" prop="testType" align="center">
<template #default="scope"> <template #default="scope1">
<el-input v-model="scope.row.testType" :disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input> <el-input v-model="scope1.row.testType"
:disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="尺寸" prop="ruleSize" align="center"> <el-table-column label="尺寸" prop="ruleSize" align="center">
<template #default="scope"> <template #default="scope1">
<el-input v-model="scope.row.ruleSize" :disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input> <el-input v-model="scope1.row.ruleSize"
:disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="量具" prop="tools" align="center"> <el-table-column label="量具" prop="tools" align="center">
<template #default="scope"> <template #default="scope1">
<!-- {{scope.row.mtName}} --> <!-- {{scope.row.mtName}} -->
<el-input v-model="scope.row.mtName" :disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input> <el-input v-model="scope1.row.mtName" :disabled="scope.row.checkUserRealName != null && scope.row.checkUserRealName != '' "></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="量具编号" prop="trialNo" align="center"> <el-table-column label="量具编号" prop="trialNo" align="center">
@ -261,7 +265,7 @@
circle circle
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
@click="removeSpecimen(subScope.$index, subScope.row)" @click="removeSpecimen(subScope.$index, subScope.row,scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>
@ -344,17 +348,17 @@
> >
<template #default="scope"> {{scope.row.standard && scope.row.standard.name}} </template> <template #default="scope"> {{scope.row.standard && scope.row.standard.name}} </template>
</el-table-column> </el-table-column>
<el-table-column label="标准值" prop="trialStandard" align="center" width="150px"> <!-- <el-table-column label="标准值" prop="trialStandard" align="center" width="150px">
<template #default="scope"> <template #default="scope"> -->
<!-- {{scope.row.standard && scope.row.standard.standardValue}} <!-- {{scope.row.standard && scope.row.standard.standardValue}}
{{'(' + scope.row.standard && scope.row.standard.downValue + '~' + scope.row.standard && scope.row.standard.upValue+ ')'}} --> {{'(' + scope.row.standard && scope.row.standard.downValue + '~' + scope.row.standard && scope.row.standard.upValue+ ')'}} -->
<span v-if="scope.row.standard"> <!-- <span v-if="scope.row.standard">
{{scope.row.standard.standardValue}} {{scope.row.standard.standardValue}}
<span v-if="scope.row.standard.downValue && scope.row.standard.upValue">{{'(' + scope.row.standard.downValue + '~' + scope.row.standard.upValue+ ')'}}</span> <span v-if="scope.row.standard.downValue && scope.row.standard.upValue">{{'(' + scope.row.standard.downValue + '~' + scope.row.standard.upValue+ ')'}}</span>
</span> </span>
<span v-else></span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column> -->
<!-- <el-table-column label="上下限" prop="trialStandard" align="center"></el-table-column> <!-- <el-table-column label="上下限" prop="trialStandard" align="center"></el-table-column>
<el-table-column label="下限" prop="trialStandard" align="center"></el-table-column> --> <el-table-column label="下限" prop="trialStandard" align="center"></el-table-column> -->
<el-table-column <el-table-column
@ -975,8 +979,8 @@ export default {
} }
this.thicknessData.push({}) this.thicknessData.push({})
}, },
removeSpecimen(index,row){ removeSpecimen(index,row,val){
if(row.checkUserRealName != null && row.checkUserRealName != ''){ if(val.checkUserRealName != null && val.checkUserRealName != ''){
return return
} }
this.thicknessData.splice(index,1) this.thicknessData.splice(index,1)

@ -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…
Cancel
Save