举手免责渲染

dev-scheduling
姜雪 3 months ago
parent 43c33faa24
commit a69512ef0e
  1. 67
      src/api/exemption/exemption.js
  2. 219
      src/views/exemption/components/addDialog.vue
  3. 40
      src/views/exemption/components/checkDialog.vue
  4. 217
      src/views/exemption/components/detailsDialog.vue
  5. 240
      src/views/exemption/index.vue

@ -0,0 +1,67 @@
import request from '@/axios';
export const exemptionList = (current, size, params) => {
return request({
url: '/blade-desk/QA/RaiseHand/list',
method: 'get',
params: {
...params,
current,
size,
},
});
};
export const saveItem = params => {
return request({
url: '/blade-desk/QA/RaiseHand/save',
method: 'post',
data: params,
});
};
export const updateItem = params => {
return request({
url: '/blade-desk/QA/RaiseHand/update',
method: 'post',
data: params,
});
};
export const detailItem = id => {
return request({
url: '/blade-desk/QA/RaiseHand/detail',
method: 'get',
params: {
id,
},
});
};
export const reviewDataItem = params => {
return request({
url: '/blade-desk/QA/RaiseHand/reviewData',
method: 'post',
data: params,
});
};
export const removeItem = ids => {
return request({
url: '/blade-desk/QA/RaiseHand/remove',
method: 'post',
params: {
ids,
},
});
};
export const userList = (current, size, params) => {
return request({
url: '/blade-system/user/userListByRaise',
method: 'get',
params: {
...params,
current,
size,
},
});
};

@ -6,7 +6,14 @@
width="30%" width="30%"
@close="closeDialog" @close="closeDialog"
> >
<avue-form ref="form" :option="option"></avue-form> <avue-form
ref="form"
:option="option"
v-model="formData"
:upload-after="uploadAfter"
:upload-exceed="uploadExceed"
:upload-delete="uploadDelete"
></avue-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
@ -17,6 +24,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { saveItem, updateItem ,userList} from '@/api/exemption/exemption';
// import { // import {
// updateProcess, // updateProcess,
// } from '../../api/flowManagement/index'; // } from '../../api/flowManagement/index';
@ -30,76 +38,100 @@ export default {
type: String, type: String,
default: '新增', default: '新增',
}, },
rowItem: {
type: Object,
default: () => {},
},
}, },
data() { data() {
return { return {
attachLink:'',
openShow: false, openShow: false,
formData: {},
userListData: [],
option: { option: {
submitBtn: false, submitBtn: false,
emptyBtn: false, emptyBtn: false,
labelWidth: 100,
column: [ column: [
{ {
label: '问题描述', label: '提出人',
prop: 'input', prop: 'reportUserId',
type: 'select',
span: 24,
rules: [{ required: true, message: '请选择提出人', trigger: 'change' }],
dicData: [],
props: {
label: 'label',
value: 'value',
},
filterable: true,
},
{
label: '岗位',
prop: 'postName',
span: 24,
rules: [{ required: true, message: '请输入岗位', trigger: 'blur' }],
},
{
label: '发生时间',
prop: 'happenDate',
type: 'date',
span: 24,
rules: [{ required: true, message: '请选择发生时间', trigger: 'change' }],
},
{
label: '免责问题描述',
prop: 'notes',
type: 'textarea',
rows: 3,
span: 24, span: 24,
rules: [{ required: true, message: '请输入', trigger: 'blur' }], rules: [{ required: true, message: '请输入免责问题描述', trigger: 'blur' }],
}, },
{ {
label: '原因', label: '原因',
prop: 'input2', prop: 'reason',
// type: 'textarea', type: 'textarea',
rows: 3, rows: 3,
span: 24, span: 24,
rules: [{ required: true, message: '请输入', trigger: 'blur' }], rules: [{ required: true, message: '请输入原因', trigger: 'blur' }],
}, },
{ {
label: '措施', label: '措施',
prop: 'input2', prop: 'measure',
// type: 'textarea', type: 'textarea',
span: 24,
rows: 3, rows: 3,
rules: [{ required: true, message: '请输入', trigger: 'blur' }], span: 24,
rules: [{ required: true, message: '请输入措施', trigger: 'blur' }],
}, },
{ {
label: '免责理由', label: '免责理由',
prop: 'input2', prop: 'raiseHandReason',
// type: 'textarea', type: 'textarea',
span: 24,
rows: 3, rows: 3,
rules: [{ required: true, message: '请输入', trigger: 'blur' }], span: 24,
rules: [{ required: true, message: '请输入免责理由', trigger: 'blur' }],
}, },
{ {
label: '免责金额', label: '免责金额',
prop: 'input2', prop: 'amount',
type: 'number', type: 'number',
span: 24, span: 24,
rules: [{ required: true, message: '请输入', trigger: 'blur' }], rules: [{ required: true, message: '请输入免责金额', trigger: 'blur' }],
},
{
label: '审核工艺员',
prop: 'input2',
type: 'select',
span: 24,
rules: [{ required: true, message: '请选择', trigger: 'blur' }],
dicData: [
{
label: '张三',
value: '1',
},
],
}, },
{ {
label: '固化文件', label: '固化文件',
prop: 'imgUrl', prop: 'fileUrl',
type: 'upload', type: 'upload',
multiple: true, multiple: true,
span: 24, span: 24,
// propsHttp: { propsHttp: {
// url: 'url', res: 'data',
// name: 'name', url: 'link',
// res: 'data', name: 'originalName',
// }, },
// action, action: '/blade-resource/oss/endpoint/put-file-attach',
}, },
], ],
}, },
@ -107,28 +139,119 @@ export default {
}, },
mounted() { mounted() {
this.openShow = this.showDialog; this.openShow = this.showDialog;
this.loadUserList({ currentPage: 1, pageSize: 10 });
},
watch: {
rowItem: {
handler(newVal) {
if (newVal && Object.keys(newVal).length > 0) {
//
this.$nextTick(() => {
const formData = { ...newVal };
// reportUserId userListData value
if (formData.reportUserId !== undefined && formData.reportUserId !== null) {
formData.reportUserId = String(formData.reportUserId);
}
this.formData = formData;
});
} else {
//
this.formData = {};
}
},
immediate: true,
deep: true,
},
}, },
methods: { methods: {
loadUserList(page, params = {}) {
userList(page.currentPage, page.pageSize).then(res => {
console.log('用户列表接口返回', res);
if (res.data.code == 200) {
const users = res.data.data;
console.log('用户列表数据', users);
this.userListData = users.map(user => ({
label: user.realName || user.name,
value: String(user.id)
}));
console.log('转换后的 userListData', this.userListData);
// option dicData
this.option.column[0].dicData = this.userListData;
}
}).catch(error => {
console.error('获取用户列表失败', error);
});
},
uploadAfter(res, done, loading, column) {
console.log('uploadAfter1', res, done, loading, column);
this.attachLink = res.link;
// this.fileForm.excelFile = [res.link];
// done();
},
uploadDelete(file, column) {
console.log('uploadDelete', file, column);
this.attachLink = '';
},
uploadExceed(limit, files, fileList, column) {
this.$message.error('最多只能上传一个文件');
},
closeDialog() { closeDialog() {
this.openShow = false; this.openShow = false;
this.formData = {};
this.attachLink = '';
this.$emit('closeDialog'); this.$emit('closeDialog');
}, },
submit() { submit() {
this.$refs.form.validate(async valid => { this.$refs.form.validate(async valid => {
if (valid) { if (valid) {
let params = { let params = {
id: this.$route.query.id, ...this.formData,
approvalStatus: '',
// status: this.option.column[0].value,
// reason: this.option.column[1].value,
}; };
// updateProcess(params).then((res) => {
// if (res.code == 200) { // yyyy-MM-dd
// this.$message.success(''); if (params.happenDate) {
// this.closeDialog(); const date = new Date(params.happenDate);
// } const year = date.getFullYear();
// }); const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
params.happenDate = `${year}-${month}-${day}`;
}
// URL
if (this.attachLink) {
params.fileUrl = this.attachLink;
}
console.log('【表单提交】', this.infoTitle, params);
try {
let res;
if (this.infoTitle === '修改') {
console.log('修改模式,需要调用修改接口');
//
res = await updateItem(params);
} else {
console.log('新增模式,需要调用新增接口');
//
res = await saveItem(params);
}
if (res.data.code == 200) {
this.$message.success(this.infoTitle + '成功');
this.closeDialog();
} else {
console.error('操作失败', res);
this.$message.error(res.msg || '操作失败');
}
} catch (error) {
console.error('操作失败', error);
this.$message.error('操作失败,请稍后重试');
}
} }
}); });
}, },

@ -1,6 +1,6 @@
<template> <template>
<el-dialog title="审核" append-to-body :modelValue="openShow" width="30%" @close="closeDialog"> <el-dialog title="审核" append-to-body :modelValue="openShow" width="30%" @close="closeDialog">
<avue-form ref="form" :option="option"></avue-form> <avue-form ref="form" :option="option" v-model="form"></avue-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
@ -14,6 +14,8 @@
// import { // import {
// updateProcess, // updateProcess,
// } from '../../api/flowManagement/index'; // } from '../../api/flowManagement/index';
import { reviewDataItem} from '@/api/exemption/exemption';
export default { export default {
props: { props: {
showDialog: { showDialog: {
@ -28,13 +30,15 @@ export default {
data() { data() {
return { return {
openShow: false, openShow: false,
form: {},
option: { option: {
submitBtn: false, submitBtn: false,
emptyBtn: false, emptyBtn: false,
labelWidth: 100,
column: [ column: [
{ {
label: '审批结果', label: '审批结果',
prop: 'input', prop: 'isSuccess',
span: 24, span: 24,
type: 'radio', type: 'radio',
dicData: [ dicData: [
@ -45,7 +49,7 @@ export default {
}, },
{ {
label: '驳回原因', label: '驳回原因',
prop: 'input2', prop: 'reason',
// type: 'select', // type: 'select',
type: 'textarea', type: 'textarea',
span: 24, span: 24,
@ -75,20 +79,24 @@ export default {
submit() { submit() {
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
if (valid) { if (valid) {
let params = { const formData = this.$refs.form.form;
id: this.$route.query.id, const params = {
approvalStatus:'', id: this.rowItem.id,
isSuccess: formData.isSuccess,
// status: this.option.column[0].value, notes: formData.reason || '',
// reason: this.option.column[1].value,
}; };
// updateProcess(params).then((res) => { reviewDataItem(params).then((res) => {
// if (res.code == 200) { if (res.data.code == 200) {
// this.$message.success(''); this.$message.success('审核成功');
// this.closeDialog(); this.closeDialog();
// } this.$emit('refresh');
// }); } else {
this.$message.error(res.data.msg || '审核失败');
}
}).catch(error => {
console.error('审核失败', error);
this.$message.error('审核失败');
});
} }
}) })
} }

@ -8,51 +8,54 @@
:column="2" :column="2"
:size="size" :size="size"
border border
label-width="100px" label-width="120px"
> >
<el-descriptions-item label="提出人"> </el-descriptions-item> <el-descriptions-item label="提出人">
<el-descriptions-item label="岗位"> </el-descriptions-item> <span v-if="userListData && userListData.length > 0">{{ reportUserName }}</span>
<el-descriptions-item label="免责问题描述"> </el-descriptions-item> <span v-else>{{ detailData.reportUserId || '-' }}</span>
<el-descriptions-item label="原因"> </el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="措施"> </el-descriptions-item> <el-descriptions-item label="岗位">{{ detailData.postName || '-' }}</el-descriptions-item>
<el-descriptions-item label="免责理由"> </el-descriptions-item> <el-descriptions-item label="免责问题描述">{{ detailData.notes || '-' }}</el-descriptions-item>
<el-descriptions-item label="免责金额"> </el-descriptions-item> <el-descriptions-item label="原因">{{ detailData.reason || '-' }}</el-descriptions-item>
<el-descriptions-item label="措施">{{ detailData.measure || '-' }}</el-descriptions-item>
<el-descriptions-item label="免责理由">{{ detailData.raiseHandReason || '-' }}</el-descriptions-item>
<el-descriptions-item label="免责金额">{{ detailData.amount || '-' }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions
class="margin-top" <el-steps :active="active" finish-status="success" class="center-steps" align-center>
title="审批信息"
:column="3"
:size="size"
border
style="margin-top: 15px"
>
</el-descriptions>
<el-steps :active="active" finish-status="success" class="center-steps">
<el-step title="提交"> <el-step title="提交">
<template #description> <template #description>
<div>提交人</div> <div class="step-info">
<div>2025-09-09</div> <div>{{ getApprovalData(0, 'pointName') }}</div>
<div>{{ getApprovalData(0, 'createTime') }}</div>
</div>
</template> </template>
</el-step> </el-step>
<el-step title="工艺员"> <el-step title="工艺员">
<template #description> <template #description>
<div>工艺员</div> <div class="step-info">
<div>2025-09-09</div> <div>{{ getApprovalData(1, 'pointName') }}</div>
<div>驳回原因</div> <div>{{ getApprovalData(1, 'createTime') }}</div>
<div class="reject-reason">{{ getApprovalData(1, 'rejectReason') || '' }}</div>
</div>
</template> </template>
</el-step> </el-step>
<el-step title="质量工程师"> <el-step title="质量工程师">
<template #description> <template #description>
<div>质量工程师名字</div> <div class="step-info">
<div>2025-09-09</div> <div>{{ getApprovalData(2, 'pointName') }}</div>
<div>驳回原因</div> <div>{{ getApprovalData(2, 'createTime') }}</div>
<div class="reject-reason">{{ getApprovalData(2, 'rejectReason') || '' }}</div>
</div>
</template> </template>
</el-step> </el-step>
<el-step title="业务主管"> <el-step title="业务主管">
<template #description> <template #description>
<div>厂长名字</div> <div class="step-info">
<div>2025-09-09</div> <div>{{ getApprovalData(3, 'pointName') }}</div>
<div>驳回原因</div> <div>{{ getApprovalData(3, 'createTime') }}</div>
<div class="reject-reason">{{ getApprovalData(3, 'rejectReason') || '' }}</div>
</div>
</template> </template>
</el-step> </el-step>
</el-steps> </el-steps>
@ -68,6 +71,7 @@
// import { // import {
// updateProcess, // updateProcess,
// } from '../../api/flowManagement/index'; // } from '../../api/flowManagement/index';
import { detailItem} from '@/api/exemption/exemption';
export default { export default {
props: { props: {
showDialog: { showDialog: {
@ -78,74 +82,103 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
userListData: {
type: Array,
default: () => [],
},
}, },
data() { data() {
return { return {
openShow: false, openShow: false,
active:1, active: 0,
detailData: {},
// option: {
// submitBtn: false,
// emptyBtn: false,
// column: [
// {
// label: '',
// prop: 'input',
// span: 24,
// type: 'radio',
// dicData: [
// { label: '', value: 0 },
// { label: '', value: 1 },
// ],
// rules: [{ required: true, message: '', trigger: 'blur' }],
// },
// {
// label: '',
// prop: 'input2',
// // type: 'select',
// type: 'textarea',
// span: 24,
// // dicData: [
// // {
// // label: '',
// // value: '1',
// // },
// // {
// // label: '',
// // value: '2',
// // }
// // ]
// },
// ],
// },
}; };
}, },
computed: {
userMapObj() {
const map = {};
this.userListData.forEach(user => {
map[user.value] = user.label;
});
return map;
},
reportUserName() {
const userId = this.detailData.reportUserId;
if (!userId || Object.keys(this.userMapObj).length === 0) {
return userId || '-';
}
return this.userMapObj[userId] || userId;
},
},
mounted() { mounted() {
this.openShow = this.showDialog; this.openShow = this.showDialog;
this.loadDetail();
},
watch: {
rowItem: {
handler(newVal) {
if (newVal && newVal.id) {
this.loadDetail();
}
},
deep: true,
immediate: true,
},
}, },
methods: { methods: {
//
getApprovalData(index, field) {
const all = this.detailData.all || [];
const item = all[index];
return item ? (item[field] || '-') : '-';
},
closeDialog() { closeDialog() {
this.openShow = false; this.openShow = false;
this.$emit('closeDialog'); this.$emit('closeDialog');
}, },
submit() { //
this.$refs.form.validate(async valid => { loadDetail() {
if (valid) {
let params = {
id: this.$route.query.id,
approvalStatus: '',
// status: this.option.column[0].value,
// reason: this.option.column[1].value, if (this.rowItem.id) {
};
// updateProcess(params).then((res) => { detailItem(this.rowItem.id).then(res => {
// if (res.code == 200) {
// this.$message.success(''); if (res.data.code == 200) {
// this.closeDialog(); this.detailData = res.data.data;
// }
// }); this.updateActiveStatus();
} }
}).catch(error => {
console.error('获取详情失败', error);
this.$message.error('获取详情失败');
}); });
}
},
//
updateActiveStatus() {
const status = Number(this.detailData.status-1);
switch (status) {
case 0:
this.active = 1; // - 1
break;
case 1:
this.active = 2; // - 2
break;
case 2:
this.active = 3; // - 3
break;
case 3:
case 4:
this.active = 3; // /退 -
break;
case 5:
this.active = 3; // - 3
break;
default:
this.active = 0; // - 0
}
}, },
}, },
}; };
@ -153,5 +186,29 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep(.el-step__title) { ::v-deep(.el-step__title) {
font-size: 14px; font-size: 14px;
font-weight: 500;
}
.center-steps {
margin-top: 30px;
margin-bottom: 20px;
}
.step-info {
font-size: 12px;
line-height: 1.8;
> div {
&:nth-child(1) {
font-weight: 500;
margin-bottom: 4px;
}
}
}
.reject-reason {
color: #f56c6c;
margin-top: 4px;
font-size: 12px;
} }
</style> </style>

@ -22,18 +22,31 @@
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="{ row }"> <template #menu="{ row }">
<el-button type="text" @click="detailsDialog(row)">详情</el-button> <el-button type="text" @click="detailsDialog(row)">详情</el-button>
<!-- <el-button
type="text"
@click="updateDialog(row)"
>修改</el-button
> -->
<!-- <el-button
type="text"
@click="review(row)"
>审核</el-button
> -->
<el-button <el-button
type="text" type="text"
@click="updateDialog(row)" @click="updateDialog(row)"
v-if="row.arr10 == '3' || row.arr10 == '4' || row.arr10 == '5'" v-if="row.status == '3' || row.status == '4' || row.status == '5'"
>修改</el-button >修改</el-button
> >
<el-button <el-button
type="text" type="text"
@click="review(row)" @click="review(row)"
v-if="row.arr10 == '1' || row.arr10 == '2' || row.arr10 == '0'" v-if="row.status == '1' || row.status == '2' || row.status == '0'"
>审核</el-button >审核</el-button
> >
<el-button type="text" @click="removeLog(row)">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
@ -43,6 +56,8 @@
:showDialog="infoShow" :showDialog="infoShow"
@closeDialog="closeDialog" @closeDialog="closeDialog"
:infoTitle="infoTitle" :infoTitle="infoTitle"
:rowItem="rowItem"
:userListData="userListData"
></addDialog> ></addDialog>
<!-- 审核 --> <!-- 审核 -->
@ -59,11 +74,14 @@
:showDialog="detailsOpen" :showDialog="detailsOpen"
@closeDialog="closeDialog" @closeDialog="closeDialog"
:rowItem="rowItem" :rowItem="rowItem"
:userListData="userListData"
></detailsDialog> ></detailsDialog>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import { exemptionList, removeItem, userList } from '@/api/exemption/exemption';
import addDialog from './components/addDialog.vue'; import addDialog from './components/addDialog.vue';
import checkDialog from './components/checkDialog.vue'; import checkDialog from './components/checkDialog.vue';
import detailsDialog from './components/detailsDialog.vue'; import detailsDialog from './components/detailsDialog.vue';
@ -108,7 +126,7 @@ export default {
delBtn: false, delBtn: false,
editBtnText: '修改', editBtnText: '修改',
labelWidth: 120, labelWidth: 120,
menuWidth: 100, menuWidth: 180,
dialogWidth: 900, dialogWidth: 900,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -125,63 +143,65 @@ 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',
align: 'center', align: 'center',
column: [ column: [
{ {
label: '提出人', label: '提出人',
prop: 'arr1', prop: 'reportUserId',
search: true,
sortable: true, sortable: true,
span: 12, span: 12,
formatter: (row, value, label, column) => {
return this.userMapObj[value] || value || '-';
},
}, },
{ {
label: '岗位', label: '岗位',
prop: 'arr2', prop: 'postName',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '发生时间', label: '发生时间',
prop: 'arr3', prop: 'happenDate',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '免责问题描述', label: '免责问题描述',
prop: 'arr4', prop: 'notes',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '原因', label: '原因',
prop: 'arr5', prop: 'reason',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '措施', label: '措施',
prop: 'arr6', prop: 'measure',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '免责理由', label: '免责理由',
prop: 'arr7', prop: 'raiseHandReason',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '免责金额', label: '免责金额',
prop: 'arr8', prop: 'amount',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -195,7 +215,7 @@ export default {
// }, // },
{ {
label: '状态', label: '状态',
prop: 'arr10', prop: 'status',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -232,9 +252,38 @@ export default {
data: [], data: [],
rowItem: {}, rowItem: {},
userListData: [],
userMap: {},
}; };
}, },
computed: {
userMapObj() {
const map = {};
this.userListData.forEach(user => {
map[user.value] = user.label;
});
return map;
},
},
methods: { methods: {
loadUserList(page, params = {}) {
userList(page.currentPage, page.pageSize).then(res => {
if (res.data.code == 200) {
const users = res.data.data;
this.userListData = users.map(user => ({
label: user.realName || user.name,
value: String(user.id)
}));
}
}).catch(error => {
console.error('获取用户列表失败', error);
});
},
// //
detailsDialog(row) { detailsDialog(row) {
this.detailsOpen = true; this.detailsOpen = true;
@ -249,16 +298,19 @@ export default {
addDialog() { addDialog() {
this.infoShow = true; this.infoShow = true;
this.infoTitle = '新增'; this.infoTitle = '新增';
this.rowItem = {};
}, },
// //
updateDialog() { updateDialog(row) {
this.infoShow = true; this.infoShow = true;
this.infoTitle = '修改'; this.infoTitle = '修改';
this.rowItem = row;
}, },
// //
closeDialog() { closeDialog() {
this.infoShow = false; this.infoShow = false;
this.detailsOpen = false; this.detailsOpen = false;
this.checkResultOpen = false;
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
}, },
rowSave(row, done, loading) { rowSave(row, done, loading) {
@ -293,17 +345,17 @@ export default {
// } // }
// ); // );
}, },
rowDel(row) { removeLog(row) {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
// return removePersonAbility(row.id); return removeItem(String(row.id));
}) })
.then(() => { .then(() => {
this.onLoad(this.page); this.onLoad(this.page, this.query);
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功!', message: '操作成功!',
@ -347,76 +399,87 @@ export default {
message: '操作成功!', message: '操作成功!',
}); });
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.data = [
{ exemptionList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
arr1: '张三', console.log(res,'00000001');
arr2: '热表分厂',
arr3: '2026-01-09', const data = res.data.data;
arr4: '问题描述1', this.page.total = data.total;
arr5: '正常操作', this.data = data.records;
arr6: '下次注意', this.loading = false;
arr7: '正常损耗',
arr8: '55', });
arr10: 0,
},
{
arr1: '张三',
arr2: '热表分厂',
arr3: '2026-01-09',
arr4: '问题描述1',
arr5: '正常操作',
arr6: '下次注意',
arr7: '正常损耗',
arr8: '55',
arr10: '1',
},
{
arr1: '张三',
arr2: '热表分厂',
arr3: '2026-01-09',
arr4: '问题描述1',
arr5: '正常操作',
arr6: '下次注意',
arr7: '正常损耗',
arr8: '55',
arr10: '2',
},
{
arr1: '张三',
arr2: '热表分厂',
arr3: '2026-01-09',
arr4: '问题描述1',
arr5: '正常操作',
arr6: '下次注意',
arr7: '正常损耗',
arr8: '55',
arr10: '3',
},
{
arr1: '张三',
arr2: '热表分厂',
arr3: '2026-01-09',
arr4: '问题描述1',
arr5: '正常操作',
arr6: '下次注意',
arr7: '正常损耗',
arr8: '55',
arr10: '4',
}, },
{ // onLoad(page, params = {}) {
arr1: '张三', // this.data = [
arr2: '热表分厂', // {
arr3: '2026-01-09', // arr1: '',
arr4: '问题描述1', // arr2: '',
arr5: '正常操作', // arr3: '2026-01-09',
arr6: '下次注意', // arr4: '1',
arr7: '正常损耗', // arr5: '',
arr8: '55', // arr6: '',
arr10: '5', // arr7: '',
}, // arr8: '55',
]; // arr10: 0,
// },
// {
// arr1: '',
// arr2: '',
// arr3: '2026-01-09',
// arr4: '1',
// arr5: '',
// arr6: '',
// arr7: '',
// arr8: '55',
// arr10: '1',
// },
// {
// arr1: '',
// arr2: '',
// arr3: '2026-01-09',
// arr4: '1',
// arr5: '',
// arr6: '',
// arr7: '',
// arr8: '55',
// arr10: '2',
// },
// {
// arr1: '',
// arr2: '',
// arr3: '2026-01-09',
// arr4: '1',
// arr5: '',
// arr6: '',
// arr7: '',
// arr8: '55',
// arr10: '3',
// },
// {
// arr1: '',
// arr2: '',
// arr3: '2026-01-09',
// arr4: '1',
// arr5: '',
// arr6: '',
// arr7: '',
// arr8: '55',
// arr10: '4',
// },
// {
// arr1: '',
// arr2: '',
// arr3: '2026-01-09',
// arr4: '1',
// arr5: '',
// arr6: '',
// arr7: '',
// arr8: '55',
// arr10: '5',
// },
// ];
// this.loading = true; // this.loading = true;
// 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;
@ -424,9 +487,12 @@ export default {
// this.page.total = res.data.data.total; // this.page.total = res.data.data.total;
// this.selectionClear(); // this.selectionClear();
// }); // });
// },
}, },
mounted() {
this.loadUserList(this.page);
console.log('组件已挂载,加载用户列表');
}, },
mounted() {},
}; };
</script> </script>
d d
Loading…
Cancel
Save