maxiaoxiao před 1 měsícem
rodič
revize
5fed5bc056

+ 1 - 1
src/components/tablePage.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="cont-table">
     <!-- :image="nonedataImg"  -->
-    <el-empty description=" " v-if="table.data.length == 0" />
+    <el-empty description=" " v-if="!table.total && table.data.length == 0" />
     <el-table
       :data="table.data"
       v-else

+ 7 - 5
src/views/remote/farmland/components/shdialog.vue

@@ -38,7 +38,7 @@
         :on-success="handleUploadSuccess"
         :show-file-list="false"
         :headers="headers"
-        class="upload-file-uploader"
+        class="upload-file"
         ref="fileUpload"
       >
         <!-- 上传按钮 -->
@@ -87,7 +87,7 @@ import {
   scDkjbxx,
   tjDkjbxx,
 } from "@/api/rsmonitoring/dkjbxx";
-const emit = defineEmits(['reset'])
+const emit = defineEmits(["reset"]);
 const { proxy } = getCurrentInstance();
 const uploadFileUrl = ref(
   import.meta.env.VITE_APP_BASE_API + "/file/upload/v1"
@@ -170,11 +170,10 @@ function reset() {
   resultform.value = {};
 }
 function download(row) {
-  //http://192.168.60.221:9300/statics/
-  window.open(`${window.axiosURI}${row.fjPath}`);
+  window.open(row.fjPath);
 }
 function preview(row) {
-  window.open(` ${window.axiosURI}${row.fjPath}`, "_blank");
+  window.open(row.fjPath, "_blank");
 }
 defineExpose({ moreAct, operate });
 
@@ -206,4 +205,7 @@ function handleDelete(index) {
 </script>
 
 <style>
+.upload-file {
+  display: inline-block;
+}
 </style>

+ 6 - 7
src/views/remote/farmland/details.vue

@@ -174,6 +174,7 @@
       >
     </div>
     <shdialog ref="shdiaRef"></shdialog>
+    <hgxdialog ref="hgxdiaRef"></hgxdialog>
     <tjdialog ref="tjdiaRef"></tjdialog>
   </div>
 </template>
@@ -181,6 +182,7 @@
   <script setup name="details">
 import Hcxx from "./hcxx.vue";
 import shdialog from "./components/shdialog.vue";
+import hgxdialog from "./components/hgxdialog.vue";
 import tjdialog from "./components/tjdialog.vue";
 import { getDetailsDk } from "@/api/rsmonitoring/dataEntry";
 import { getDkjbxx, getAuditflow, getStep } from "@/api/rsmonitoring/dkjbxx";
@@ -202,6 +204,7 @@ const formde = ref(route.query.form == "dataEntry");
 const props = defineProps({});
 let nowObj = {};
 const shdiaRef = ref(null);
+const hgxdiaRef = ref(null);
 const tjdiaRef = ref(null);
 
 const data = reactive({
@@ -243,7 +246,7 @@ function getDetails({ pcsjid, id }) {
 }
 function moreAct(actitem) {
   if (actitem.auditflowOperateType == "001")
-    shdiaRef.value.moreAct(actitem, infoObj.value);
+    hgxdiaRef.value.moreAct(actitem, infoObj.value);
   else if (actitem.auditflowOperateType == "002")
     shdiaRef.value.moreAct(actitem, infoObj.value);
   else if (actitem.auditflowOperateType == "003")
@@ -252,12 +255,8 @@ function moreAct(actitem) {
 
 function operate(oname) {
   let aStep = route.query.dataType + oname;
-  if (oname == "SH") {
-    shdiaRef.value.operate(infoObj.value, aStep);
-  } else if (oname == "HGX")
-    scDkjbxx(pram).then((res) => {
-      resultform.value = res.data || {};
-    });
+  if (oname == "SH") shdiaRef.value.operate(infoObj.value, aStep);
+  else if (oname == "HGX") hgxdiaRef.value.operate(infoObj.value, aStep);
   else if (oname == "TJ") tjdiaRef.value.operate(infoObj.value, aStep);
 }
 

+ 1 - 2
src/views/remote/farmland/index.vue

@@ -265,8 +265,7 @@ export default {
       }
     },
     next(add) {
-      let index = this.nowObj.index + (add ? 1 : -1);
-      console.log(index, this.nowObj.index, add ? 1 : -1, "index");
+      let index = Number(this.nowObj.index) + (add ? 1 : -1);
       if (index == -1 || index == this.tableData.length) {
         this.$modal.msgError(`当前为${add ? "最后" : "第"}一个`);
       } else {