|
@ -63,14 +63,14 @@ |
|
|
const visible = ref(false); |
|
|
const visible = ref(false); |
|
|
const showEdit = ref(true); |
|
|
const showEdit = ref(true); |
|
|
const infoObject = ref({}); |
|
|
const infoObject = ref({}); |
|
|
const data = ref({}); |
|
|
const equipmentAlarm = ref({}); |
|
|
const statusOptions = ref(); |
|
|
const statusOptions = ref(); |
|
|
const logList = ref([ |
|
|
const logList = ref([ |
|
|
{ name: '李四', status: '3', time: '2024-03-10 10:00:00', desc: '完成' }, |
|
|
{ name: '李四', status: 3, time: '2024-03-10 10:00:00', desc: '完成' }, |
|
|
{ name: '王五', status: '5', time: '2024-03-10 10:00:00' }, |
|
|
{ name: '王五', status: 5, time: '2024-03-10 10:00:00' }, |
|
|
{ name: '王五', status: '4', time: '2024-03-10 10:00:00' }, |
|
|
{ name: '王五', status: 4, time: '2024-03-10 10:00:00' }, |
|
|
{ name: '王五', status: '2', time: '2024-03-10 10:00:00', desc: '创建工单' }, |
|
|
{ name: '王五', status: 2, time: '2024-03-10 10:00:00', desc: '创建工单' }, |
|
|
{ name: '赵六', status: '1', time: '2024-03-10 10:00:00' }, |
|
|
{ name: '赵六', status: 1, time: '2024-03-10 10:00:00' }, |
|
|
]); |
|
|
]); |
|
|
const config = ref({ |
|
|
const config = ref({ |
|
|
size: logList.value.length, |
|
|
size: logList.value.length, |
|
@ -81,25 +81,28 @@ |
|
|
}; |
|
|
}; |
|
|
const btnClick = () => { |
|
|
const btnClick = () => { |
|
|
NsMessage.success('操作成功'); |
|
|
NsMessage.success('操作成功'); |
|
|
|
|
|
delete infoObject.value.time; |
|
|
|
|
|
console.log(infoObject.value, equipmentAlarm.value, '操作'); |
|
|
console.log('btnClick'); |
|
|
console.log('btnClick'); |
|
|
}; |
|
|
}; |
|
|
const toggle = (data) => { |
|
|
const toggle = (data) => { |
|
|
data.value = data; |
|
|
console.log(data, '数据'); |
|
|
|
|
|
equipmentAlarm.value = data; |
|
|
infoObject.value = { ...logList.value[0] }; |
|
|
infoObject.value = { ...logList.value[0] }; |
|
|
if (data.value.createWorkOrder === 1) { |
|
|
if (equipmentAlarm.value.createWorkOrder === 1) { |
|
|
statusOptions.value = [ |
|
|
statusOptions.value = [ |
|
|
{ value: '1', label: '待处理' }, |
|
|
{ value: 1, label: '待处理' }, |
|
|
{ value: '2', label: '处理中' }, |
|
|
{ value: 2, label: '处理中' }, |
|
|
{ value: '3', label: '已完成' }, |
|
|
{ value: 3, label: '已完成' }, |
|
|
{ value: '4', label: '超时' }, |
|
|
{ value: 4, label: '超时' }, |
|
|
{ value: '5', label: '已关闭' }, |
|
|
{ value: 5, label: '已关闭' }, |
|
|
]; |
|
|
]; |
|
|
} else { |
|
|
} else { |
|
|
statusOptions.value = [ |
|
|
statusOptions.value = [ |
|
|
{ value: '1', label: '待处理' }, |
|
|
{ value: 1, label: '待处理' }, |
|
|
{ value: '2', label: '处理中' }, |
|
|
{ value: 2, label: '处理中' }, |
|
|
{ value: '3', label: '已完成' }, |
|
|
{ value: 3, label: '已完成' }, |
|
|
{ value: '5', label: '已关闭' }, |
|
|
{ value: 5, label: '已关闭' }, |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
let statusMap = { |
|
|
let statusMap = { |
|
@ -126,7 +129,7 @@ |
|
|
return { |
|
|
return { |
|
|
infoObject, |
|
|
infoObject, |
|
|
showEdit, |
|
|
showEdit, |
|
|
data, |
|
|
equipmentAlarm, |
|
|
statusOptions, |
|
|
statusOptions, |
|
|
btnClick, |
|
|
btnClick, |
|
|
visible, |
|
|
visible, |
|
|