This commit is contained in:
parent
5ecde86836
commit
6c13392998
|
|
@ -934,11 +934,21 @@ watch(
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
)
|
)
|
||||||
|
|
||||||
onMounted(() => {
|
watch(
|
||||||
if (route.query.id) {
|
() => route.query.id,
|
||||||
getDetail()
|
(newId) => {
|
||||||
}
|
if (newId) {
|
||||||
})
|
getDetail()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true },
|
||||||
|
)
|
||||||
|
|
||||||
|
// onMounted(() => {
|
||||||
|
// if (route.query.id) {
|
||||||
|
// getDetail()
|
||||||
|
// }
|
||||||
|
// })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -8,51 +8,51 @@ export const buildFormColumns = (
|
||||||
businessTypeOptions,
|
businessTypeOptions,
|
||||||
riskLevelOptions,
|
riskLevelOptions,
|
||||||
) => [
|
) => [
|
||||||
{
|
{
|
||||||
type: 'month',
|
type: 'month',
|
||||||
prop: 'monthlyPlan',
|
prop: 'monthlyPlan',
|
||||||
placeholder: '请选择月份',
|
placeholder: '请选择月份',
|
||||||
defaultValue: dayjs().format('YYYY-MM'), // 默认当前月份
|
defaultValue: dayjs().format('YYYY-MM'), // 默认当前月份
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
prop: 'inspectionStationId',
|
prop: 'inspectionStationId',
|
||||||
placeholder: '请选择运检站',
|
placeholder: '请选择运检站',
|
||||||
options: inspectionStationOptions.map((item) => ({
|
options: inspectionStationOptions.map((item) => ({
|
||||||
label: item.value,
|
label: item.value,
|
||||||
value: item.id,
|
value: item.id,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
prop: 'keyWord',
|
prop: 'keyWord',
|
||||||
placeholder: '请输入关键字',
|
placeholder: '请输入关键字',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
prop: 'planMajorId',
|
prop: 'planMajorId',
|
||||||
placeholder: '请选择专业',
|
placeholder: '请选择专业',
|
||||||
options: majorOptions.map((item) => ({
|
options: majorOptions.map((item) => ({
|
||||||
label: item.planMajorName,
|
label: item.planMajorName,
|
||||||
value: item.planMajorId,
|
value: item.planMajorId,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
prop: 'businessTypeId',
|
prop: 'businessTypeId',
|
||||||
placeholder: '请选择业务类型',
|
placeholder: '请选择业务类型',
|
||||||
options: businessTypeOptions.map((item) => ({
|
options: businessTypeOptions.map((item) => ({
|
||||||
label: item.planMajorName,
|
label: item.planMajorName,
|
||||||
value: item.planMajorId,
|
value: item.planMajorId,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
prop: 'riskLevel',
|
prop: 'riskLevel',
|
||||||
placeholder: '请选择风险等级',
|
placeholder: '请选择风险等级',
|
||||||
options: riskLevelOptions,
|
options: riskLevelOptions,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 月计划列表表格列
|
// 月计划列表表格列
|
||||||
export const tableColumns = [
|
export const tableColumns = [
|
||||||
|
|
@ -71,7 +71,7 @@ export const tableColumns = [
|
||||||
prop: 'planPersonnel',
|
prop: 'planPersonnel',
|
||||||
label: '计划投入管理人员数量',
|
label: '计划投入管理人员数量',
|
||||||
formatter: (row) => {
|
formatter: (row) => {
|
||||||
return row.personneltList?.length || ''
|
return row.personneltList?.length || 0
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ export const tableColumns = [
|
||||||
formatter: (row) => {
|
formatter: (row) => {
|
||||||
return (
|
return (
|
||||||
(dayjs(row.plannedEndTime).diff(dayjs(row.plannedStartTime), 'day') + 1) *
|
(dayjs(row.plannedEndTime).diff(dayjs(row.plannedStartTime), 'day') + 1) *
|
||||||
row.planSkilledWorkerDay || ''
|
row.planSkilledWorkerDay || 0
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -96,7 +96,7 @@ export const tableColumns = [
|
||||||
formatter: (row) => {
|
formatter: (row) => {
|
||||||
return (
|
return (
|
||||||
(dayjs(row.plannedEndTime).diff(dayjs(row.plannedStartTime), 'day') + 1) *
|
(dayjs(row.plannedEndTime).diff(dayjs(row.plannedStartTime), 'day') + 1) *
|
||||||
row.planAuxiliaryWorkerDay || ''
|
row.planAuxiliaryWorkerDay || 0
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1035,14 +1035,14 @@ const getDetail = async () => {
|
||||||
formData.value.planMajorId = data.planMajorId
|
formData.value.planMajorId = data.planMajorId
|
||||||
formData.value.businessTypeId = data.businessTypeId
|
formData.value.businessTypeId = data.businessTypeId
|
||||||
formData.value.planCategoryId = data.planCategoryId
|
formData.value.planCategoryId = data.planCategoryId
|
||||||
formData.value.towerBaseNumber = data.towerBaseNumber || ''
|
formData.value.towerBaseNumber = data.towerBaseNumber
|
||||||
formData.value.planCarNum = data.planCarNum || ''
|
formData.value.planCarNum = data.planCarNum
|
||||||
formData.value.planSkilledWorkerNum = data.planSkilledWorkerNum || ''
|
formData.value.planSkilledWorkerNum = data.planSkilledWorkerNum
|
||||||
formData.value.planAuxiliaryWorkerNum = data.planAuxiliaryWorkerNum || ''
|
formData.value.planAuxiliaryWorkerNum = data.planAuxiliaryWorkerNum
|
||||||
formData.value.planAuxiliaryWorkerDay = data.planAuxiliaryWorkerDay || ''
|
formData.value.planAuxiliaryWorkerDay = data.planAuxiliaryWorkerDay
|
||||||
formData.value.planSkilledWorkerDay = data.planSkilledWorkerDay || ''
|
formData.value.planSkilledWorkerDay = data.planSkilledWorkerDay
|
||||||
formData.value.planSubCarNum = data.planSubCarNum || ''
|
formData.value.planSubCarNum = data.planSubCarNum
|
||||||
formData.value.actualWorkingDay = data.actualWorkingDay || ''
|
formData.value.actualWorkingDay = data.actualWorkingDay
|
||||||
formData.value.riskLevel = data.riskLevel
|
formData.value.riskLevel = data.riskLevel
|
||||||
|
|
||||||
// 2. 从后端返回的数据更新路由参数字段(如果后端返回了这些字段)
|
// 2. 从后端返回的数据更新路由参数字段(如果后端返回了这些字段)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue