|
@@ -3,7 +3,12 @@
|
|
|
<custom-header :name="pageType === 'plant' ? '种植方案' : '农事规划'"></custom-header>
|
|
<custom-header :name="pageType === 'plant' ? '种植方案' : '农事规划'"></custom-header>
|
|
|
<div class="plan-content">
|
|
<div class="plan-content">
|
|
|
<div class="plan-content-header" v-if="pageType === 'plant'">
|
|
<div class="plan-content-header" v-if="pageType === 'plant'">
|
|
|
- <el-select class="select-item" v-model="specieValue" placeholder="选择品类" @change="() => getListMySchemes('left')">
|
|
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ class="select-item"
|
|
|
|
|
+ v-model="specieValue"
|
|
|
|
|
+ placeholder="选择品类"
|
|
|
|
|
+ @change="() => getListMySchemes('left')"
|
|
|
|
|
+ >
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in options"
|
|
v-for="item in options"
|
|
|
:key="item.id"
|
|
:key="item.id"
|
|
@@ -20,18 +25,21 @@
|
|
|
@change="handleTabChange"
|
|
@change="handleTabChange"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <farm-work-plan-timeline
|
|
|
|
|
- class="timeline-container"
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="timeline-wrap"
|
|
|
:class="{
|
|
:class="{
|
|
|
- 'timeline-container-plant': pageType == 'plant',
|
|
|
|
|
- 'timeline-container-no-permission': !hasPlanPermission,
|
|
|
|
|
|
|
+ 'timeline-container-plant-wrap': pageType == 'plant',
|
|
|
|
|
+ 'timeline-container-no-permission-wrap': !hasPlanPermission,
|
|
|
}"
|
|
}"
|
|
|
- :pageType="pageType"
|
|
|
|
|
- :farmId="route.query.farmId"
|
|
|
|
|
- :containerId="containerIdData"
|
|
|
|
|
- @row-click="handleRowClick"
|
|
|
|
|
- :disableClick="!hasPlanPermission"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <farm-work-plan-timeline
|
|
|
|
|
+ :pageType="pageType"
|
|
|
|
|
+ :farmId="route.query.farmId"
|
|
|
|
|
+ :containerId="containerIdData"
|
|
|
|
|
+ @row-click="handleRowClick"
|
|
|
|
|
+ :disableClick="!hasPlanPermission"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="custom-bottom-fixed-btns" v-has-permission="'农事规划'">
|
|
<div class="custom-bottom-fixed-btns" v-has-permission="'农事规划'">
|
|
|
<div class="bottom-btn-group">
|
|
<div class="bottom-btn-group">
|
|
@@ -101,7 +109,7 @@ import FarmWorkPlanTimeline from "@/components/pageComponents/FarmWorkPlanTimeli
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
import detailDialog from "@/components/detailDialog.vue";
|
|
import detailDialog from "@/components/detailDialog.vue";
|
|
|
import eventBus from "@/api/eventBus";
|
|
import eventBus from "@/api/eventBus";
|
|
|
-import { ElMessage,ElMessageBox } from "element-plus";
|
|
|
|
|
|
|
+import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
|
|
|
|
@@ -134,7 +142,7 @@ const getSpecieList = () => {
|
|
|
VE_API.farm.fetchSpecieList({ agriculturalId: userInfo.agriculturalId }).then(({ data }) => {
|
|
VE_API.farm.fetchSpecieList({ agriculturalId: userInfo.agriculturalId }).then(({ data }) => {
|
|
|
options.value = data || [];
|
|
options.value = data || [];
|
|
|
specieValue.value = data[0].defaultContainerId;
|
|
specieValue.value = data[0].defaultContainerId;
|
|
|
- getListMySchemes('left');
|
|
|
|
|
|
|
+ getListMySchemes("left");
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -176,7 +184,7 @@ const getPhenologyList = async () => {
|
|
|
containerSpaceTimeId: containerSpaceTimeId.value,
|
|
containerSpaceTimeId: containerSpaceTimeId.value,
|
|
|
agriculturalId: userInfo.agriculturalId,
|
|
agriculturalId: userInfo.agriculturalId,
|
|
|
farmId: route.query.farmId,
|
|
farmId: route.query.farmId,
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
const res = await VE_API.monitor.listPhenology(params);
|
|
const res = await VE_API.monitor.listPhenology(params);
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
mergedReproductiveList.value = res.data || [];
|
|
mergedReproductiveList.value = res.data || [];
|
|
@@ -252,7 +260,7 @@ const handleCancelCopyPlan = () => {
|
|
|
if (code === 0) {
|
|
if (code === 0) {
|
|
|
showCopyPlan.value = false;
|
|
showCopyPlan.value = false;
|
|
|
ElMessage.success("删除成功");
|
|
ElMessage.success("删除成功");
|
|
|
- getListMySchemes('left');
|
|
|
|
|
|
|
+ getListMySchemes("left");
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -272,25 +280,27 @@ const handleConfirmCopyPlan = () => {
|
|
|
sourceSchemeId: active.value,
|
|
sourceSchemeId: active.value,
|
|
|
schemeName: copyPlanName.value,
|
|
schemeName: copyPlanName.value,
|
|
|
})
|
|
})
|
|
|
- .then(({ code,data }) => {
|
|
|
|
|
|
|
+ .then(({ code, data }) => {
|
|
|
if (code === 0) {
|
|
if (code === 0) {
|
|
|
showCopyPlan.value = false;
|
|
showCopyPlan.value = false;
|
|
|
ElMessage.success("复制成功");
|
|
ElMessage.success("复制成功");
|
|
|
- getListMySchemes('right');
|
|
|
|
|
- currentTab.value = data
|
|
|
|
|
|
|
+ getListMySchemes("right");
|
|
|
|
|
+ currentTab.value = data;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ VE_API.monitor
|
|
|
|
|
+ .renameScheme({
|
|
|
|
|
+ schemeId: active.value,
|
|
|
|
|
+ name: copyPlanName.value,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(({ code }) => {
|
|
|
|
|
+ if (code === 0) {
|
|
|
|
|
+ showCopyPlan.value = false;
|
|
|
|
|
+ ElMessage.success("修改成功");
|
|
|
|
|
+ getListMySchemes("auto");
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }else{
|
|
|
|
|
- VE_API.monitor.renameScheme({
|
|
|
|
|
- schemeId: active.value,
|
|
|
|
|
- name: copyPlanName.value,
|
|
|
|
|
- }).then(({ code }) => {
|
|
|
|
|
- if (code === 0) {
|
|
|
|
|
- showCopyPlan.value = false;
|
|
|
|
|
- ElMessage.success("修改成功");
|
|
|
|
|
- getListMySchemes('auto');
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -353,14 +363,14 @@ const handleRowClick = (item) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .timeline-container {
|
|
|
|
|
|
|
+ .timeline-wrap {
|
|
|
height: calc(100vh - 40px - 73px);
|
|
height: calc(100vh - 40px - 73px);
|
|
|
- padding: 0 12px;
|
|
|
|
|
- &.timeline-container-plant {
|
|
|
|
|
|
|
+ padding-left: 12px;
|
|
|
|
|
+ &.timeline-container-plant-wrap {
|
|
|
height: calc(100vh - 40px - 73px - 38px);
|
|
height: calc(100vh - 40px - 73px - 38px);
|
|
|
}
|
|
}
|
|
|
// 没有权限时,底部按钮不显示,高度增加 73px
|
|
// 没有权限时,底部按钮不显示,高度增加 73px
|
|
|
- &.timeline-container-no-permission {
|
|
|
|
|
|
|
+ &.timeline-container-no-permission-wrap {
|
|
|
height: calc(100vh - 40px - 18px);
|
|
height: calc(100vh - 40px - 18px);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|