This commit is contained in:
@@ -68,14 +68,14 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
if (isUpdate.value && id) {
|
||||
const record = await inspectionPlanInfo(id);
|
||||
record.planDate = [record.startDate, record.endDate]
|
||||
if(record.inspectionPlanPeriod=='1'){
|
||||
record.inspectionMonth=record.inspectionMonth?.split(',')
|
||||
record.inspectionDay=record.inspectionDay?.split(',')
|
||||
}else {
|
||||
record.inspectionWorkday=record.inspectionWorkday?.split(',')
|
||||
if (record.inspectionPlanPeriod == '1') {
|
||||
record.inspectionMonth = record.inspectionMonth?.split(',')
|
||||
record.inspectionDay = record.inspectionDay?.split(',')
|
||||
} else {
|
||||
record.inspectionWorkday = record.inspectionWorkday?.split(',')
|
||||
}
|
||||
if(record.inspectionPlanStaffVoList&&record.inspectionPlanStaffVoList.length){
|
||||
record.userId=record.inspectionPlanStaffVoList.map(item=>item.userId)
|
||||
if (record.inspectionPlanStaffVoList && record.inspectionPlanStaffVoList.length) {
|
||||
record.userId = record.inspectionPlanStaffVoList.map(item => item.userId)
|
||||
}
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
@@ -97,28 +97,28 @@ async function handleConfirm() {
|
||||
if (data.planDate && data.planDate.length) {
|
||||
data.startDate = data.planDate[0]
|
||||
data.endDate = data.planDate[1]
|
||||
data.startTime=data.planDate[0]?.split(' ')[1]
|
||||
data.endTime=data.planDate[1]?.split(' ')[1]
|
||||
data.startTime = data.planDate[0]?.split(' ')[1]
|
||||
data.endTime = data.planDate[1]?.split(' ')[1]
|
||||
}
|
||||
if(data.inspectionPlanPeriod=='1'){
|
||||
data.inspectionMonth=data.inspectionMonth?.join(',')
|
||||
data.inspectionDay=data.inspectionDay?.join(',')
|
||||
data.inspectionWorkday=undefined
|
||||
}else {
|
||||
data.inspectionWorkday=data.inspectionWorkday?.join(',')
|
||||
data.inspectionMonth=undefined
|
||||
data.inspectionDay=undefined
|
||||
if (data.inspectionPlanPeriod == '1') {
|
||||
data.inspectionMonth = data.inspectionMonth?.join(',')
|
||||
data.inspectionDay = data.inspectionDay?.join(',')
|
||||
data.inspectionWorkday = undefined
|
||||
} else {
|
||||
data.inspectionWorkday = data.inspectionWorkday?.join(',')
|
||||
data.inspectionMonth = undefined
|
||||
data.inspectionDay = undefined
|
||||
}
|
||||
if(data.userId){
|
||||
data.inspectionPlanStaffBoList=[]
|
||||
data.userId.forEach(item=>
|
||||
if (data.userId) {
|
||||
data.inspectionPlanStaffBoList = []
|
||||
data.userId.forEach((item: any) => {
|
||||
data.inspectionPlanStaffBoList.push({
|
||||
userId:item,
|
||||
startTime:data.startDate,
|
||||
endTime:data.endDate
|
||||
}))
|
||||
userId: item,
|
||||
startTime: data.startDate,
|
||||
endTime: data.endDate
|
||||
})
|
||||
})
|
||||
}
|
||||
// data.userId=data.userId?.join(',')
|
||||
await (isUpdate.value ? inspectionPlanUpdate(data) : inspectionPlanAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
@@ -143,7 +143,7 @@ async function queryPersonData() {
|
||||
const res = await personList(params);
|
||||
const options = res.rows.map((user) => ({
|
||||
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex')
|
||||
+ '-' + user.phone+'-'+user.unitName,
|
||||
+ '-' + user.phone + '-' + user.unitName,
|
||||
value: user.id,
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
@@ -200,12 +200,13 @@ const filterOption = (input: string, option: any) => {
|
||||
<style lang="scss" scoped>
|
||||
.before-time {
|
||||
display: flex;
|
||||
|
||||
.tail-text {
|
||||
width: 100px;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
line-height:32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user