ソースを参照

文件中心修改

bobo04052021@163.com 4 ヶ月 前
コミット
eb3f99340a

+ 5 - 0
api/api.js

@@ -97,6 +97,11 @@ const apiService = {
 	    params
 	  );
   },
+  getFilePreview(params){
+	  return http.post(
+	  "/ventanaly-sharefile/fileServer/preview",
+	  params)
+  },
   /**
    * 获取文件访问路径
    * @param avatar

+ 1 - 0
common/service/config.service.js

@@ -4,6 +4,7 @@ if (process.env.NODE_ENV == "development") {
   BASE_URL = "http://182.92.126.35:9999"; // 开发环境
 } else {
   // BASE_URL = "http://10.246.95.4:9999"; // 布尔台
+  // BASE_URL = "http://10.120.120.164:9999"; // 察哈素
   BASE_URL = "http://182.92.126.35:9999"; // 生产环境
 }
 let staticDomainURL = BASE_URL + "/sys/common/static";

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "智能通风",
-    "appid" : "__UNI__2000523",
+    "appid" : "__UNI__8193760",
     "description" : "",
     "versionName" : "2.2.22",
     "versionCode" : 1,

+ 56 - 43
pages/filecenter/filecenter.vue

@@ -1,11 +1,6 @@
 <template name="filecenter">
   <view class="container">
-    <u-navbar
-      title="文件中心"
-      :safeAreaInsetTop="true"
-      leftIcon=""
-    >
-    </u-navbar>
+    <u-navbar title="文件中心" :safeAreaInsetTop="true" leftIcon=""> </u-navbar>
     <view class="main">
       <u-subsection
         :list="list"
@@ -19,48 +14,44 @@
           v-for="(item, index) in fileData"
           :key="index"
         >
-          <view class="">
-            <view class="content flcard">
-              <view
-                class="demo-layout bg-purple-light"
-                style="margin-bottom: 20rpx"
-              >
-                <view style="margin-top: 10rpx">
-                  <text class="text-style1">{{ item.fileName }}</text>
-                </view>
+          <view class="content flcard" @click="openFile(item.id)" v-if="item.bpmStatus == 1">
+            <view
+              class="demo-layout bg-purple-light"
+              style="margin-bottom: 20rpx"
+            >
+              <view style="margin-top: 10rpx">
+                <text class="text-style1">{{ item.fileName }}</text>
               </view>
-              <view class="datacard laiyuan">
-                <view style="margin: 20rpx 20rpx">
-                  <text class="text-style">{{ item.fileSource }}</text>
-                </view>
-                <view style="margin: 20rpx 20rpx; font-size: small"
-                  >文件来源</view
-                >
+            </view>
+            <view class="datacard laiyuan">
+              <view style="margin: 20rpx 20rpx">
+                <text class="text-style">{{ item.fileSource }}</text>
               </view>
-              <view class="datacard zhuangtai">
-                <view style="margin: 20rpx 20rpx">
-                  <text class="text-style">{{ item.bpmStatus_dictText }}</text>
-                </view>
-                <view style="margin: 20rpx 20rpx; font-size: small"
-                  >审批状态</view
-                >
+              <view style="margin: 20rpx 20rpx; font-size: small"
+                >文件来源</view
+              >
+            </view>
+            <view class="datacard zhuangtai">
+              <view style="margin: 20rpx 20rpx">
+                <text class="text-style">{{ item.bpmStatus_dictText }}</text>
               </view>
-              <view class="datacard user">
-                <view style="margin: 20rpx 20rpx">
-                  <text class="text-style">{{ item.createBy }}</text>
-                </view>
-                <view style="margin: 20rpx 20rpx; font-size: small"
-                  >创建人</view
-                >
+              <view style="margin: 20rpx 20rpx; font-size: small"
+                >审批状态</view
+              >
+            </view>
+            <view class="datacard user">
+              <view style="margin: 20rpx 20rpx">
+                <text class="text-style">{{ item.createBy }}</text>
               </view>
-              <view class="datacard time">
-                <view style="margin: 20rpx 20rpx">
-                  <text class="text-style">{{ item.createTime }}</text>
-                </view>
-                <view style="margin: 20rpx 20rpx; font-size: small"
-                  >上传时间</view
-                >
+              <view style="margin: 20rpx 20rpx; font-size: small">创建人</view>
+            </view>
+            <view class="datacard time">
+              <view style="margin: 20rpx 20rpx">
+                <text class="text-style">{{ item.createTime }}</text>
               </view>
+              <view style="margin: 20rpx 20rpx; font-size: small"
+                >上传时间</view
+              >
             </view>
           </view>
         </u-list-item>
@@ -80,6 +71,7 @@ export default {
       list: [{ name: "全部" }, { name: "待审批" }, { name: "已审批" }],
       curNow: 0,
       fileData: [],
+	  bpmStatus:1,//1处理中  2 已完成  3 已驳回
     };
   },
   mounted() {
@@ -117,6 +109,25 @@ export default {
           });
       });
     },
+    openFile(ID) {
+      var params = {
+        id: ID,
+      };
+      new Promise((resolve, reject) => {
+        api
+          .getFilePreview(params)
+          .then((response) => {
+            if (response.data.code == 200) {
+            } else {
+              reject(response);
+            }
+          })
+          .catch((error) => {
+            console.log("catch===>response", response);
+            reject(error);
+          });
+      });
+    },
   },
 };
 </script>
@@ -124,8 +135,10 @@ export default {
 <style scoped>
 .main {
   /* margin-top: 100rpx; */
+  margin-top: 80px;
   display: flex;
   flex-direction: column;
+  margin-top: 80px; /* 内容区域顶部留出导航栏的高度 */
 }
 
 .itemback {

+ 1 - 1
pages/home/detail/autodoor/autodoor.vue

@@ -483,7 +483,7 @@ passwordPopup {
   background-color: #ffffff;
 }
 .main {
-  margin-top: 80rpx;
+  margin-top: 80px;
 }
 .container {
   display: flex;

+ 2 - 1
pages/warndata/warndata.vue

@@ -309,11 +309,12 @@ export default {
   flex-direction: column;
 }
 .main {
+  // margin-top: 100rpx;
   display: flex;
   flex-direction: column;
   flex: 1;
   width: 100%;
-  padding-top: 40px; /* 内容区域顶部留出导航栏的高度 */
+  margin-top: 80px; /* 内容区域顶部留出导航栏的高度 */
 }
 .text-style {
   font-weight: bold;