|
@@ -11,90 +11,27 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <div class="scheme-type-list">
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="item in schemeTypeOptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ class="scheme-type-tag"
|
|
|
|
|
+ :class="{ 'is-active': schemeType === item.value }"
|
|
|
|
|
+ @click="schemeType = item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.label }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<!-- 表格 -->
|
|
<!-- 表格 -->
|
|
|
<div class="table-wrap">
|
|
<div class="table-wrap">
|
|
|
- <el-table :data="tableData" border class="scheme-table" :header-cell-style="headerCellStyle"
|
|
|
|
|
- :cell-style="{ verticalAlign: 'top' }">
|
|
|
|
|
- <el-table-column prop="name" label="农事名称" min-width="110" fixed />
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="农事类型" min-width="120">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <div class="type-tags">
|
|
|
|
|
- <span v-for="(item, idx) in row.types" :key="idx" class="type-tag">{{ item }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column prop="trigger" label="触发条件" min-width="160" />
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="药肥处方" min-width="220">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <div class="prescription">
|
|
|
|
|
- <div class="prescription__title">{{ row.prescription.category }}</div>
|
|
|
|
|
- <div class="prescription__desc">{{ row.prescription.desc }}</div>
|
|
|
|
|
- <div class="prescription__freq">{{ row.prescription.freq }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="执行窗口" align="center">
|
|
|
|
|
- <el-table-column label="执行窗口" min-width="140" align="center">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <div class="execute-window">{{ row.execute.window }}</div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column label="执行设备" min-width="140">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <div class="device-groups">
|
|
|
|
|
- <div class="device-group">
|
|
|
|
|
- <div class="device-group__label">主要设备:</div>
|
|
|
|
|
- <div class="device-group__tags">
|
|
|
|
|
- <span
|
|
|
|
|
- v-for="(item, idx) in row.execute.primaryDevices"
|
|
|
|
|
- :key="`primary-${idx}`"
|
|
|
|
|
- class="type-tag"
|
|
|
|
|
- >{{ item }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="device-group">
|
|
|
|
|
- <div class="device-group__label">备用设备:</div>
|
|
|
|
|
- <div class="device-group__tags">
|
|
|
|
|
- <span
|
|
|
|
|
- v-for="(item, idx) in row.execute.backupDevices"
|
|
|
|
|
- :key="`backup-${idx}`"
|
|
|
|
|
- class="type-tag"
|
|
|
|
|
- >{{ item }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column label="注意事项" min-width="160" prop="execute.notes" />
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="复核规程" align="center">
|
|
|
|
|
- <el-table-column label="复核时间" min-width="120">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <span class="review-time">
|
|
|
|
|
- 执行后 <em class="review-time__num">{{ row.review.days }}</em> 天
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column label="复核标准" prop="review.standard" min-width="160" />
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="操作" width="190" fixed="right">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <div class="row-ops">
|
|
|
|
|
- <el-button class="row-ops__btn" @click="onEditRow(row)">编辑</el-button>
|
|
|
|
|
- <el-button class="row-ops__btn" @click="onDetailRow(row)">详情</el-button>
|
|
|
|
|
- <el-button class="row-ops__btn row-ops__btn--danger" type="danger" @click="onDeleteRow(row)">
|
|
|
|
|
- 删除
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
|
|
+ <SchemeTable
|
|
|
|
|
+ :data="tableData"
|
|
|
|
|
+ show-ops
|
|
|
|
|
+ @edit="onEditRow"
|
|
|
|
|
+ @detail="onDetailRow"
|
|
|
|
|
+ @delete="onDeleteRow"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 底部操作 -->
|
|
<!-- 底部操作 -->
|
|
@@ -118,15 +55,10 @@ import { Edit } from "@element-plus/icons-vue";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import FarmWorkEditDialog from "./FarmWorkEditDialog.vue";
|
|
import FarmWorkEditDialog from "./FarmWorkEditDialog.vue";
|
|
|
import FarmWorkDetailDialog from "./FarmWorkDetailDialog.vue";
|
|
import FarmWorkDetailDialog from "./FarmWorkDetailDialog.vue";
|
|
|
|
|
+import SchemeTable from "./SchemeTable.vue";
|
|
|
|
|
|
|
|
const emit = defineEmits(["edit-scheme"]);
|
|
const emit = defineEmits(["edit-scheme"]);
|
|
|
|
|
|
|
|
-const headerCellStyle = {
|
|
|
|
|
- background: "#F5F5F5",
|
|
|
|
|
- color: "#535353",
|
|
|
|
|
- fontWeight: 400,
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
const schemeList = ref([
|
|
const schemeList = ref([
|
|
|
{ id: 1, name: "方案一" },
|
|
{ id: 1, name: "方案一" },
|
|
|
{ id: 2, name: "方案二" },
|
|
{ id: 2, name: "方案二" },
|
|
@@ -134,6 +66,12 @@ const schemeList = ref([
|
|
|
{ id: 4, name: "方案二" },
|
|
{ id: 4, name: "方案二" },
|
|
|
]);
|
|
]);
|
|
|
const activeSchemeId = ref(1);
|
|
const activeSchemeId = ref(1);
|
|
|
|
|
+const schemeTypeOptions = [
|
|
|
|
|
+ { label: "标准化方案", value: "standard" },
|
|
|
|
|
+ { label: "气象类方案", value: "weather" },
|
|
|
|
|
+ { label: "异常类方案", value: "anomaly" },
|
|
|
|
|
+];
|
|
|
|
|
+const schemeType = ref("standard");
|
|
|
const editVisible = ref(false);
|
|
const editVisible = ref(false);
|
|
|
const detailVisible = ref(false);
|
|
const detailVisible = ref(false);
|
|
|
const currentRow = ref(null);
|
|
const currentRow = ref(null);
|
|
@@ -223,7 +161,7 @@ $text: rgba(0, 0, 0, 0.6);
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
gap: 8px;
|
|
gap: 8px;
|
|
|
- padding: 20px 0;
|
|
|
|
|
|
|
+ padding: 20px 0 0;
|
|
|
|
|
|
|
|
.scheme-tab {
|
|
.scheme-tab {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -254,129 +192,35 @@ $text: rgba(0, 0, 0, 0.6);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .table-wrap {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- min-height: 0;
|
|
|
|
|
- overflow: auto;
|
|
|
|
|
-
|
|
|
|
|
- .scheme-table {
|
|
|
|
|
- color: #000;
|
|
|
|
|
-
|
|
|
|
|
- .type-tags {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- align-items: flex-start;
|
|
|
|
|
- gap: 4px;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .type-tag {
|
|
|
|
|
- padding: 1px 6px;
|
|
|
|
|
- border-radius: 4px;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- color: #2199f8;
|
|
|
|
|
- background: rgba(33, 153, 248, 0.1);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .prescription {
|
|
|
|
|
- &__title {
|
|
|
|
|
- display: inline-block;
|
|
|
|
|
- width: fit-content;
|
|
|
|
|
- color: #4c4c4c;
|
|
|
|
|
- margin-bottom: 2px;
|
|
|
|
|
- background: rgba(125, 125, 125, 0.1);
|
|
|
|
|
- padding: 0 6px;
|
|
|
|
|
- border-radius: 2px;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &__desc {
|
|
|
|
|
- font-size: 13px;
|
|
|
|
|
- line-height: 1.6;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &__freq {
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- color: #86909c;
|
|
|
|
|
- line-height: 1.5;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .device-groups {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- gap: 8px;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .device-group {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- align-items: flex-start;
|
|
|
|
|
- gap: 4px;
|
|
|
|
|
-
|
|
|
|
|
- &__label {
|
|
|
|
|
- font-size: 13px;
|
|
|
|
|
- line-height: 1.4;
|
|
|
|
|
- color: #86909c;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &__tags {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- align-items: flex-start;
|
|
|
|
|
- gap: 4px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .execute-window {
|
|
|
|
|
- color: rgba(0, 0, 0, 0.4);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .scheme-type-list {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ padding: 10px 0 20px;
|
|
|
|
|
|
|
|
- .review-time {
|
|
|
|
|
- color: #000;
|
|
|
|
|
- font-style: normal;
|
|
|
|
|
|
|
+ .scheme-type-tag {
|
|
|
|
|
+ padding: 6px 10px;
|
|
|
|
|
+ border-radius: 3px;
|
|
|
|
|
+ background: #f3f3f3;
|
|
|
|
|
+ color: $text;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
|
|
|
- &__num {
|
|
|
|
|
- color: $primary;
|
|
|
|
|
- font-style: normal;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ &:hover {
|
|
|
|
|
+ color: $primary;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .row-ops {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
- gap: 8px;
|
|
|
|
|
-
|
|
|
|
|
- &__btn {
|
|
|
|
|
- margin: 0;
|
|
|
|
|
- height: 28px;
|
|
|
|
|
- padding: 0 10px;
|
|
|
|
|
- font-size: 13px;
|
|
|
|
|
- color: #4c4c4c;
|
|
|
|
|
- background: #fff;
|
|
|
|
|
- border: 1px solid #d2d2d2;
|
|
|
|
|
- border-radius: 2px;
|
|
|
|
|
-
|
|
|
|
|
- &:hover {
|
|
|
|
|
- color: $primary;
|
|
|
|
|
- border-color: rgba($primary, 0.45);
|
|
|
|
|
- background: rgba($primary, 0.06);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &--danger {
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- background: #f56b6b;
|
|
|
|
|
- border-color: #f56b6b;
|
|
|
|
|
-
|
|
|
|
|
- &:hover {
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- background: #f78989;
|
|
|
|
|
- border-color: #f78989;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ &.is-active {
|
|
|
|
|
+ background: $primary;
|
|
|
|
|
+ color: #fff;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .table-wrap {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.page-footer {
|
|
.page-footer {
|