|
|
@@ -474,7 +474,7 @@ export default {
|
|
|
var min = ('' + d.getMinutes()).padStart(2, '0')
|
|
|
return y + '-' + m + '-' + day + ' ' + h + ':' + min
|
|
|
},
|
|
|
- // 调整归属(仅在 subjectId 为 null 的报告上显示)
|
|
|
+ // 调整归属(仅在 subjectId 为空(无归属)的报告上显示)
|
|
|
adjustBinding(item) {
|
|
|
var self = this
|
|
|
// 弹出选择操作
|
|
|
@@ -483,35 +483,25 @@ export default {
|
|
|
itemColor: '#1890ff',
|
|
|
success: function(res) {
|
|
|
if (res.tapIndex === 0) {
|
|
|
- // 绑定新归属:弹出成员选择器
|
|
|
+ // 绑定新归属:提示需选择成员,当前小程序端简化处理
|
|
|
uni.showModal({
|
|
|
title: '选择归属成员',
|
|
|
- content: '请选择报告的归属成员',
|
|
|
- confirmText: '确定',
|
|
|
- cancelText: '取消',
|
|
|
- success: function(modalRes) {
|
|
|
- if (modalRes.confirm) {
|
|
|
- // 这里需要调用后端 reassignReport 接口,传入 newSubjectId
|
|
|
- // 由于小程序端需要选择具体成员,简化处理:提示功能待前端完整实现
|
|
|
- uni.showToast({ title: '功能待管理端操作', icon: 'none' })
|
|
|
- }
|
|
|
- }
|
|
|
+ content: '请在管理端选择归属成员后操作',
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: '确定'
|
|
|
})
|
|
|
} else {
|
|
|
// 解除归属:subjectId 设为 null
|
|
|
- uni.request({
|
|
|
- url: '/api/health/report/reassign',
|
|
|
- method: 'POST',
|
|
|
- data: {
|
|
|
- reportId: item.id,
|
|
|
- subjectId: null
|
|
|
- },
|
|
|
- success: function(resp) {
|
|
|
- if (resp.data.code === 0) {
|
|
|
- uni.showToast({ title: '归属已解除', icon: 'success' })
|
|
|
- self.loadData()
|
|
|
- }
|
|
|
+ reassignReport(item.id, null).then(function(resp) {
|
|
|
+ if (resp.code === 200) {
|
|
|
+ uni.showToast({ title: '归属已解除', icon: 'success' })
|
|
|
+ self.loadData()
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: resp.message || '解除归属失败', icon: 'none' })
|
|
|
}
|
|
|
+ }).catch(function(e) {
|
|
|
+ console.log('解除归属失败', e)
|
|
|
+ uni.showToast({ title: '操作失败', icon: 'none' })
|
|
|
})
|
|
|
}
|
|
|
}
|