allen 2 lat temu
rodzic
commit
b1eb1526bf

+ 2 - 2
.env.development

@@ -5,13 +5,13 @@ VUE_APP_TITLE = 水价改革管理系统
 ENV = 'development'
 
 # 开发环境 API BASEURL
-VUE_APP_BASE_API = '/fmsdev-api'
+VUE_APP_BASE_API = 
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 
 #
-VUE_APP_BASE_RESOURCE_PREFIX = /fmsdev-api
+VUE_APP_BASE_RESOURCE_PREFIX = 
 
 SYS_ID = TODO
 

+ 1 - 0
src/views/peasantHouseholdManage/components/addedFarmers.vue

@@ -296,6 +296,7 @@ export default {
       this.areaAll = value?.waterrightAreasize || '-'
       this.waterRightAll = value?.waterrightAmount || '0'
       this.yieldPer = value ? value?.waterrightAmount == 0 ? 0 : (value?.waterrightAreasize) / (value?.waterrightAmount) : 0
+      this.yieldPer = (+this.yieldPer).toFixed(2)
       this.residualWaterRight = value?.amountResidue ?? 0
     },
     findItemByAreaId(areaId,list) {

+ 15 - 16
src/views/waterSubsidy/components/newPolicy.vue

@@ -41,6 +41,7 @@
              <img v-if="baseForm.src" :src="baseForm.src" class="avatar">
              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
            </el-upload>
+           <span style="color:#F56C6C">仅支持上传jpg/jpeg/png且大小不超过5M的图片</span>
         </el-form-item>
       </el-row>
       <el-row style="height: 200px;">
@@ -160,23 +161,21 @@ export default {
     },
     editRow: {
       handler(val) {
-        console.log(val,'valvlalvalvallva')
         this.baseForm = { ...this.editRow }
       },
       deep: true
     },
-    baseForm: {
-      handler(val) {
-        const { src, subsidypolicyContent } = val
-        if (src) this.$refs.baseForm.clearValidate(['src'])
-        if (!checkEmpty(subsidypolicyContent)) {
-          this.$refs.baseForm.clearValidate(['subsidypolicyContent'])
-        } else { 
-          this.$refs.baseForm.validateField('subsidypolicyContent')
-        }
-      },
-      deep: true
-    }
+    'baseForm.src'(val) {
+      console.log(val, 'valvalvlalvalslsdkal12312')
+      if(val) this.$refs.baseForm.clearValidate(['src'])
+    },
+    'baseForm.subsidypolicyContent'(val) {
+      if (!checkEmpty(val)) {
+        this.$refs?.baseForm?.clearValidate(['subsidypolicyContent'])
+      } else {
+        this.$refs?.baseForm?.validateField('subsidypolicyContent')
+      }
+     }
   },
   methods: {
     onCreated(editor) {
@@ -196,11 +195,11 @@ export default {
         fileType === '.jpg' ||
         fileType === '.png' ||
         fileType === '.jpeg';
-      const isLt2M = file.size / 1024 / 1024 < 2;
+      const isLt2M = file.size / 1024 / 1024 < 5;
       if (!isLt2M) {
         Message({
           type: 'error',
-          message: '上传头像图片大小不能超过 2MB!'
+          message: '上传头像图片大小不能超过 5MB!'
         })
       }
       return isOKType && isLt2M;
@@ -232,7 +231,7 @@ export default {
       } else { 
         const params = {
           areaIds: this.areaId,
-          resIds: this.editRow.resIds,
+          resIds: this.resId,
           subsidypolicyContent: this.baseForm.subsidypolicyContent,
           subsidypolicyTitle: this.baseForm.subsidypolicyTitle,
           subsidypolicyId: this.baseForm.subsidypolicyId