فهرست منبع

feat:修改页面样式

wangsisi 2 روز پیش
والد
کامیت
98dcc6b314

+ 1 - 1
src/components/pageComponents/ArchivesFarmTimeLine.vue

@@ -65,7 +65,7 @@
                                         </div>
                                         <div class="title-wrap van-ellipsis" v-if="fw.flowStatus != null && fw.flowStatus != 0 && fw.flowStatus != -2">
                                             <div class="title-text">{{ handleTagType(fw.flowStatus, fw.executeEvidenceAuditStatus) }}</div>
-                                            <div class="title-text blue-tag" v-if="fw?.executionLimitDays >= 0">限时溯源</div>
+                                            <!-- <div class="title-text blue-tag" v-if="fw?.executionLimitDays >= 0">限时溯源</div> -->
                                         </div>
                                     </div>
                                     <div class="card-right"

+ 25 - 10
src/views/old_mini/home/subPages/prescriptionPage.vue

@@ -33,9 +33,10 @@
                             <span>您是否接受植保服务</span>
                         </div>
                         <div class="item-checkbox">
-                            <el-radio-group v-model="basicForm.expertCode">
-                                <el-radio-button label="需要" value="1" />
-                                <el-radio-button label="不需要" value="0" />
+                            <el-radio-group v-model="basicForm.needZbCode" @change="handleNeedZbChange">
+                                <el-radio-button v-for="item in (basicFarmFormData.needZbOptions || [])"
+                                    :key="item.code || item.value"
+                                    :label="item.name || item.label" :value="String(item.code ?? item.value)" />
                             </el-radio-group>
                         </div>
                     </div>
@@ -77,7 +78,7 @@ onActivated(() => {
 
 const loadingPage = ref(false);
 const basicForm = ref({
-    expertCode: "",
+    needZbCode: "",
 });
 
 const basicFarmFormData = ref({});
@@ -86,10 +87,10 @@ const getBasicFarmFormData = () => {
     VE_API.basic_farm.fetchBasicFarmFormData({ subjectId: route.query?.subjectId }).then(({ data }) => {
         basicFarmFormData.value = data;
 
-        if (data.expertOptions && Array.isArray(data.expertOptions)) {
-            const selectedExpert = data.expertOptions.find(item => item.selected);
+        if (Array.isArray(basicFarmFormData.value.needZbOptions)) {
+            const selectedExpert = basicFarmFormData.value.needZbOptions.find(item => item.selected);
             if (selectedExpert) {
-                basicForm.value.expertCode = selectedExpert.code;
+                basicForm.value.needZbCode = String(selectedExpert.code ?? selectedExpert.value);
             }
         }
     }).finally(() => {
@@ -137,6 +138,20 @@ function handleSelect(type, index, custom) {
     basicFarmFormData.value[type][index].selected = !basicFarmFormData.value[type][index].selected;
 }
 
+function handleNeedZbChange(selectedCode) {
+    const selectedCodeStr = String(selectedCode ?? "");
+    if (!Array.isArray(basicFarmFormData.value.needZbOptions)) {
+        return;
+    }
+    basicFarmFormData.value.needZbOptions = basicFarmFormData.value.needZbOptions.map(item => {
+        const currentCode = String(item.code ?? item.value ?? "");
+        return {
+            ...item,
+            selected: currentCode === selectedCodeStr,
+        };
+    });
+}
+
 function isPopupConfirmDisabled() {
     return String(popupInputVal.value ?? "").trim().length === 0;
 }
@@ -202,8 +217,8 @@ function handleSubmit() {
         irrigationMethods: irrigationMethods.map(code => Number(code)),
     };
 
-    if (basicForm.value.expertCode) {
-        draftData.preferredExpertCode = Number(basicForm.value.expertCode);
+    if (basicForm.value.needZbCode !== undefined && basicForm.value.needZbCode !== null && basicForm.value.needZbCode !== "") {
+        draftData.needZbCode = Number(basicForm.value.needZbCode);
     }
 
     return draftData;
@@ -237,7 +252,7 @@ async function submit() {
                 if (route.query.subjectId) {
                     router.go(-1);
                 } else {
-                    localStorage.setItem("selectedFarmId", res.data.id);
+                    localStorage.setItem("selectedFarmId", res.data[0]?.subjectId);
                     localStorage.setItem("selectedFarmName", res.data.name);
                     router.replace('/growth_report');
                 }

+ 17 - 2
src/views/old_mini/monitor/subPages/agriculturalDetail.vue

@@ -9,7 +9,9 @@
                         <span class="date">{{ imgInfo.samplingTime }}</span>
                     </div>
                     <div class="ratio-tip">
-                        <div>物候进程</div>
+                        <div class="title">物候进程</div>
+                        <span>{{ imgInfo.regions }}出现新梢的果树占比为</span>
+                        <span class="ratio">{{ imgInfo.totalCount }}%</span>
                     </div>
                     <div class="photo-grid">
                         <div
@@ -115,10 +117,23 @@ const getFarmImagePage = () => {
 
                 .ratio-tip {
                     font-size: 14px;
-                    // color: #2199f8;
                     padding: 5px 8px;
                     background: rgba(33, 153, 248, 0.08);
                     border-radius: 5px;
+                    display: flex;
+                    align-items: center;
+                    .title{
+                        font-size: 12px;
+                        color: #fff;
+                        margin-right: 12px;
+                        background: #2199f8;
+                        padding: 2px 6px;
+                        border-radius: 2px;
+                    }
+                    .ratio{
+                        color: #2199f8;
+                        margin-left: 3px;
+                    }
                 }
 
                 .photo-grid {

+ 1 - 1
src/views/old_mini/monitor/subPages/farmInfo.vue

@@ -216,7 +216,7 @@ const handleAddVariety = () => {
 .farm-details-page {
     background: #f2f3f5;
     height: calc(100vh - 40px);
-    padding: 10px 12px;
+    padding: 0 12px;
     overflow: auto;
 
     .line-title {