Browse Source

[26110604] 首页只展示光伏电厂: workbench summary-grid前2张card(总览/风电场)加display:none仅保留光伏电场, ConfigStationMapper三个select(list/ById/ByIds)固定增加station_type=1, 场站管理页取消场站类型查询选项与新增/编辑弹窗字段(display:none保留代码), 新增默认与保存时stationType固定为1(光伏)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
taosj 1 ngày trước cách đây
mục cha
commit
3fe2cc8f39

+ 4 - 2
forecast-backend-server/src/main/resources/mybatis/config/ConfigStationMapper.xml

@@ -45,7 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectConfigStationList" parameterType="ConfigStation" resultMap="ConfigStationResult">
         <include refid="selectConfigStationVo"/>
-        <where>  
+        <where>
+            and station_type = 1
             <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
             <if test="stationCode != null  and stationCode != ''"> and station_code = #{stationCode}</if>
             <if test="superiorAreaId != null  and superiorAreaId != ''"> and superior_area_id = #{superiorAreaId}</if>
@@ -78,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <select id="selectConfigStationById" parameterType="Long" resultMap="ConfigStationResult">
         <include refid="selectConfigStationVo"/>
-        where id = #{id}
+        where id = #{id} and station_type = 1
     </select>
 
     <select id="selectConfigStationByIds" parameterType="Long" resultMap="ConfigStationResult">
@@ -86,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
+        and station_type = 1
     </select>
         
     <insert id="insertConfigStation" parameterType="ConfigStation">

+ 4 - 3
forecast-backend-vue/src/views/ufo/config/station/index.vue

@@ -8,7 +8,7 @@
         <a-form-item label="场站编码">
           <a-input v-model:value="queryParams.stationCode" allow-clear placeholder="请输入场站编码" />
         </a-form-item>
-        <a-form-item label="场站类型">
+        <a-form-item label="场站类型" style="display:none">
           <a-select v-model:value="queryParams.stationType" allow-clear class="query-select" :options="stationTypeOptions" />
         </a-form-item>
         <a-form-item label="是否启用">
@@ -86,7 +86,7 @@
               <a-input v-model:value="form.stationCode" allow-clear />
             </a-form-item>
           </a-col>
-          <a-col :span="12">
+          <a-col :span="12" style="display:none">
             <a-form-item label="场站类型" name="stationType">
               <a-select v-model:value="form.stationType" allow-clear :options="stationTypeOptions" />
             </a-form-item>
@@ -271,12 +271,13 @@ const openForm = async (record) => {
     }
     resetObject(form, data);
   } else {
-    resetObject(form, { isEnable: '1', stationType: 0 });
+    resetObject(form, { isEnable: '1', stationType: 1 });
   }
   formOpen.value = true;
 };
 
 const submitForm = async () => {
+  form.stationType = 1;
   await formRef.value?.validate();
   if (form.id) {
     await updateStation(form);

+ 1 - 1
forecast-backend-vue/src/views/ufo/workbench/WorkbenchPage.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="workbench-page">
     <section class="summary-grid">
-      <div v-for="card in summaryCards" :key="card.key" class="summary-card">
+      <div v-for="(card, cardIndex) in summaryCards" :key="card.key" class="summary-card" :style="{ display: cardIndex < 2 ? 'none' : undefined }">
         <div class="summary-card__label">
           <img
             v-if="card.iconType === 'image'"