bug 处理

This commit is contained in:
13405411873 2025-07-28 23:44:09 +08:00
parent cc8e31ce08
commit 11ca9dd7d2

View File

@ -31,6 +31,7 @@
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="生成排序" align="center" prop="orderNum" >
<template slot-scope="scope">
<div style="display: flex;align-items: center">
<input
type="number"
@ -43,6 +44,7 @@
>
<el-button size="mini" icon="el-icon-check" circle @click="updateOrderNum(scope.row)"></el-button>
</div>
</template>
</el-table-column>
<el-table-column label="患者姓名" align="center" prop="patientName" />
<el-table-column label="年龄" align="center" prop="patientAge" />
@ -198,6 +200,7 @@ import {
import request from '@/utils/request'
import dayjs from 'dayjs'
import {updateNum} from "@/views/system/shMenu2/scriptSh";
export default {
name: "Record",
data() {
@ -322,6 +325,22 @@ export default {
}
}
},
/**
* 更新排序号
*/
updateOrderNum(row) {
if (!row.orderNum || row.orderNum < 1) {
this.$message.warning("排序号必须为正整数");
return;
}
// scriptSh.js
updateNum({id: row.id, orderNum: row.orderNum}).then(response => {
this.$modal.msgSuccess("排序号更新成功");
}).catch(() => {
this.$modal.msgError("排序号更新失败");
});
},
/** 查询测评记录列表 */
getList() {
this.loading = true;