|
@@ -55,6 +55,24 @@
|
|
|
|
|
|
|
|
<div class="form-card__body form-card__body--locked" @click="tipSelectVariety">
|
|
<div class="form-card__body form-card__body--locked" @click="tipSelectVariety">
|
|
|
<div class="form-row">
|
|
<div class="form-row">
|
|
|
|
|
+ <span class="form-label">当下物候期</span>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="defaultForm.phenologyId"
|
|
|
|
|
+ class="form-select"
|
|
|
|
|
+ placeholder="选择物候期"
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ popper-class="variety-select-popper"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="opt in phenologyOptions"
|
|
|
|
|
+ :key="opt.id"
|
|
|
|
|
+ :label="opt.name"
|
|
|
|
|
+ :value="opt.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form-row">
|
|
|
<span class="form-label muted">起种点问题</span>
|
|
<span class="form-label muted">起种点问题</span>
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="defaultForm.startTime"
|
|
v-model="defaultForm.startTime"
|
|
@@ -100,6 +118,24 @@
|
|
|
|
|
|
|
|
<div class="form-card__body">
|
|
<div class="form-card__body">
|
|
|
<div class="form-row">
|
|
<div class="form-row">
|
|
|
|
|
+ <span class="form-label">当下物候期</span>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="item.phenologyId"
|
|
|
|
|
+ class="form-select"
|
|
|
|
|
+ placeholder="选择物候期"
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ popper-class="variety-select-popper"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="opt in phenologyOptions"
|
|
|
|
|
+ :key="opt.id"
|
|
|
|
|
+ :label="opt.name"
|
|
|
|
|
+ :value="opt.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form-row">
|
|
|
<span class="form-label">什么时候来一梢?</span>
|
|
<span class="form-label">什么时候来一梢?</span>
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="item.startTime"
|
|
v-model="item.startTime"
|
|
@@ -365,6 +401,7 @@ const selectedList = ref([]);
|
|
|
const defaultForm = reactive({
|
|
const defaultForm = reactive({
|
|
|
varietyId: "",
|
|
varietyId: "",
|
|
|
varietyName: "",
|
|
varietyName: "",
|
|
|
|
|
+ phenologyId: "",
|
|
|
startTime: "",
|
|
startTime: "",
|
|
|
area: "",
|
|
area: "",
|
|
|
});
|
|
});
|
|
@@ -420,12 +457,21 @@ const handleSearch = () => {
|
|
|
gridExpanded.value = false;
|
|
gridExpanded.value = false;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const phenologyOptions = [
|
|
|
|
|
+ { id: "p1", name: "梢期" },
|
|
|
|
|
+ { id: "p2", name: "花期" },
|
|
|
|
|
+ { id: "p3", name: "坐果期" },
|
|
|
|
|
+ { id: "p4", name: "转色期" },
|
|
|
|
|
+ { id: "p5", name: "成熟期" },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
const createSelectedItem = (variety, category) => ({
|
|
const createSelectedItem = (variety, category) => ({
|
|
|
uid: `sel-${++selectedUid}`,
|
|
uid: `sel-${++selectedUid}`,
|
|
|
id: variety.id,
|
|
id: variety.id,
|
|
|
name: variety.name,
|
|
name: variety.name,
|
|
|
categoryId: category.id,
|
|
categoryId: category.id,
|
|
|
categoryName: category.name,
|
|
categoryName: category.name,
|
|
|
|
|
+ phenologyId: "",
|
|
|
startTime: "",
|
|
startTime: "",
|
|
|
area: "",
|
|
area: "",
|
|
|
location: "",
|
|
location: "",
|
|
@@ -434,6 +480,7 @@ const createSelectedItem = (variety, category) => ({
|
|
|
const resetDefaultForm = () => {
|
|
const resetDefaultForm = () => {
|
|
|
defaultForm.varietyId = "";
|
|
defaultForm.varietyId = "";
|
|
|
defaultForm.varietyName = "";
|
|
defaultForm.varietyName = "";
|
|
|
|
|
+ defaultForm.phenologyId = "";
|
|
|
defaultForm.startTime = "";
|
|
defaultForm.startTime = "";
|
|
|
defaultForm.area = "";
|
|
defaultForm.area = "";
|
|
|
};
|
|
};
|
|
@@ -514,11 +561,12 @@ const handleConfirm = () => {
|
|
|
sessionStorage.removeItem(SELECTED_LIST_KEY);
|
|
sessionStorage.removeItem(SELECTED_LIST_KEY);
|
|
|
emit("confirm", {
|
|
emit("confirm", {
|
|
|
defaultForm: { ...defaultForm },
|
|
defaultForm: { ...defaultForm },
|
|
|
- varieties: selectedList.value.map(({ id, name, categoryId, categoryName, startTime, area, location }) => ({
|
|
|
|
|
|
|
+ varieties: selectedList.value.map(({ id, name, categoryId, categoryName, phenologyId, startTime, area, location }) => ({
|
|
|
id,
|
|
id,
|
|
|
name,
|
|
name,
|
|
|
categoryId,
|
|
categoryId,
|
|
|
categoryName,
|
|
categoryName,
|
|
|
|
|
+ phenologyId,
|
|
|
startTime,
|
|
startTime,
|
|
|
area,
|
|
area,
|
|
|
location,
|
|
location,
|
|
@@ -794,6 +842,44 @@ const handleConfirm = () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .form-select {
|
|
|
|
|
+ flex: 0 0 auto;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ max-width: 160px;
|
|
|
|
|
+ margin-left: auto;
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-select__wrapper) {
|
|
|
|
|
+ box-shadow: none;
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ min-height: auto;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-select__selection) {
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ flex: 0 1 auto;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-select__placeholder),
|
|
|
|
|
+ :deep(.el-select__selected-item) {
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #1a1a1a;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-select__placeholder) {
|
|
|
|
|
+ color: rgba(0, 0, 0, 0.25);
|
|
|
|
|
+ position: static;
|
|
|
|
|
+ transform: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-select__caret) {
|
|
|
|
|
+ color: rgba(0, 0, 0, 0.25);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.map {
|
|
.map {
|
|
|
width: 98px;
|
|
width: 98px;
|
|
|
height: 60px;
|
|
height: 60px;
|