Prechádzať zdrojové kódy

Merge branch 'wangtao-daily' of uskycloud/usky-web-mobile into master

gez 1 mesiac pred
rodič
commit
9694a04224

+ 1 - 1
src/config.js

@@ -5,7 +5,7 @@ export default {
   ip: "192.168.10.165:9300",
 
   //#ifdef APP-PLUS || MP-WEIXIN
-  // baseUrl: "https://gateWay.usky.cn/prod-api",
+  baseUrl: "https://gateWay.usky.cn/prod-api",
   //#endif
 
   //#ifdef H5

+ 12 - 0
src/pages.json

@@ -828,6 +828,18 @@
                         }
                     }
                 },
+                {
+                    "path": "projectMange/record/detailsAll",
+                    "style": {
+                        "navigationBarTitleText": "报告详情",
+                        "enablePullDownRefresh": false,
+                        "navigationStyle": "custom",
+                        "app-plus": {
+                            "bounce": "none",
+                            "titleNView": false
+                        }
+                    }
+                },
                 {
                     "path": "projectMange/overview/index",
                     "style": {

+ 127 - 51
src/pages/business/common/projectMange/record/details.vue

@@ -32,6 +32,10 @@
   >
     <template #default>
       <view class="content-area radius bg-white" v-for="(item, index) in dataList" :key="index" style="margin-top: 6px">
+        <view class="content-area-top menu-item" style="float: right; padding: 10px 0px">
+          <view class="content-area-top-time"> </view>
+          <u-icon class="content-area-top-icon" name="more-dot-fill" size="20" color="#000" @click="moreClick(item)"></u-icon>
+        </view>
         <view class="content-area-header flex mb10">
           <img :src="item?.avatar" class="content-area-header-avatarImg mr10" v-if="item?.avatar" />
           <u-avatar
@@ -68,7 +72,7 @@
         <view class="content-area-center mb10">
           <view class="content-area-center-top">图片</view>
           <view class="imageBox" v-if="JSON.parse(item.reportImage) && JSON.parse(item.reportImage).length > 0">
-            <image class="image m5" style="width: 50px" mode="widthFix" v-for="(a, index) in JSON.parse(item.reportImage)" :key="index" :src="a.url" @click="previewImage(index)" />
+            <image class="image m5" style="width: 50px" mode="widthFix" v-for="(a, index2) in JSON.parse(item.reportImage)" :key="index2" :src="a.url" @click="previewImage(index,index)" />
           </view>
           <view class="imageBox" v-else>无</view>
         </view>
@@ -76,39 +80,77 @@
         <view class="content-area-center mb10">
           <view class="content-area-center-top">附件 </view>
           <view v-if="JSON.parse(item.reportFile) && JSON.parse(item.reportFile).length > 0">
-            <uni-link v-for="(file, index) in JSON.parse(item.reportFile)" :key="index" :href="file.url" text="file.url" style="color: rgba(0, 0, 0, 0.7)">{{ file.name }}</uni-link>
+            <uni-link v-for="(file, index2) in JSON.parse(item.reportFile)" :key="index2" :href="file.url" text="file.url" style="color: rgba(0, 0, 0, 0.7)">{{ file.name }}</uni-link>
           </view>
           <view v-else>无</view>
         </view>
-        <view class="content-area-center mb10" style="display: flex; flex-wrap: wrap">
+        <view class="content-area-center mb10" style="display: flex; flex-wrap: wrap" v-if="item.pmReportReaders.read > 0 || item.pmReportReaders.unRead > 0">
           <u-tabs
-            :list="tabsList"
-            :current="tabsCurrent"
-            @click="tabsClick"
+            :list="item.tabsList"
+            :current="item.tab"
+            @click="tabsClick(index, $event.value)"
             lineColor="#333"
             :activeStyle="{ color: '#333', fontSize: '14px' }"
             :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
             :scrollable="false"
             style="width: 100%"
           ></u-tabs>
-          <view class="content-area-header mt20 mb10 text-center" style="display: inline-block" v-for="(item, index) in reportDetailData.treeSelectNodes" :key="index">
-            <img v-if="item?.avatar" class="content-area-header-avatarImg mlr5" :src="item.avatar" style="display: block; width: 40px; height: 40px" />
+          <view class="content-area-header mt20 mb10 text-center" style="display: inline-block" v-for="(item2, index2) in item.tabsList[item.tab].treeSelectNodes" :key="index2">
+            <img v-if="item2?.avatar" class="content-area-header-avatarImg mlr5" :src="item2.avatar" style="display: block; width: 40px; height: 40px" />
             <u-avatar
-              v-if="!item.avatar"
+              v-if="!item2.avatar"
               class="content-area-header-avatar mlr5"
-              :text="item.nickName.length > 2 ? item.nickName.slice(1, 3) : item.nickName"
+              :text="item2.nickName.length > 2 ? item2.nickName.slice(1, 3) : item2.nickName"
               shape="square"
               size="40"
               fontSize="12"
               color="#ffffff"
               :bgColor="proxy.$settingStore.themeColor.color"
             ></u-avatar>
-            <u-text :text="item.nickName" color="#000000" size="14" align="center"></u-text>
+            <u-text :text="item2.nickName" color="#000000" size="14" align="center"></u-text>
           </view>
         </view>
       </view>
     </template>
+
   </oa-scroll>
+  <u-popup :show="popup.show" mode="bottom" bgColor="#fff" :round="10" @close="popup.show = false">
+    <view
+      :style="{
+        borderTopLeftRadius: '10px',
+        borderTopRightRadius: '10px',
+        overflow: 'hidden',
+      }"
+    >
+      <u-button
+        class="custom-style"
+        type="info"
+        size="normal"
+        :text="`查看${eventList.createBy}的所有日报`"
+        :customStyle="{
+          height: '50px',
+          color: '#3c9cff',
+          borderWidth: 0,
+          borderRadius: 0,
+          borderBottomWidth: '1px',
+        }"
+        @click="handleSubmit(eventList)"
+      ></u-button>
+      <u-button
+        class="custom-style"
+        type="info"
+        size="normal"
+        text="取消"
+        :customStyle="{
+          height: '50px',
+          color: '#3c9cff',
+          border: 'none',
+          borderRadius: 0,
+        }"
+        @click="popup.show = false"
+      ></u-button>
+    </view>
+  </u-popup>
 </template>
 
 <script setup>
@@ -140,19 +182,17 @@ const state = reactive({
     reportId: "",
   },
   userData: [], //用户列表
-  images: [], //图片列表
-  files: [], //附件列表
-  tabsList: [
-    { name: "已读", value: 0 },
-    { name: "未读", value: 1 },
-  ],
-  tabsCurrent: 0,
   pageSize:1,
   total:10,
   submitDate:undefined,
+  popup: {
+    show: false, //弹窗显示
+    content: "", //提示信息
+  },
+  eventList: {}, //数据存储
 });
 
-const { dataList, userData, tabsList, tabsCurrent, pageSize, total } = toRefs(state);
+const { dataList, userData, tabsList, tabsCurrent, pageSize, total, popup, eventList } = toRefs(state);
   /**
  * 返回上级页面
  * @param defaultPage 默认页面
@@ -169,14 +209,13 @@ const { dataList, userData, tabsList, tabsCurrent, pageSize, total } = toRefs(st
 /**
  * @tabs点击事件
  */
-function tabsClick(e) {
-  state.tabsCurrent = e.index;
-  reportDetailData.value.treeSelectNodes = proxy.$common.findTreeNodes(tree.value, state.tabsCurrent == 0 ? pmReportReaders.value.readAlready : pmReportReaders.value.readNotAlready);
+function tabsClick(index,e) {
+  dataList.value[index].tab = e
 }
-function previewImage(index) {
+function previewImage(index1,index2) {
   uni.previewImage({
-    current: index, // 当前显示图片索引
-    urls: state.images, // 需要预览的图片http链接列表
+    current: index2, // 当前显示图片索引
+    urls: dataList.value[index1].images[index2], // 需要预览的图片http链接列表
   });
 }
 
@@ -196,28 +235,49 @@ function init() {
         pageSize: 1,
       })
       .then((requset) => {
-        dataList.value = requset.data.records;
-        state.submitDate = requset.data.records[0].submitDate;
+        if(requset?.data?.records.length>0){
+          dataRebuild(requset.data.records);
+          if(requset.data.records[0].readFlag == "0"){
+            projectApi()
+            .ReportRecordReadFlag({ reportId: requset.data.records[0].id })
+            .then((res) => {
+              if (res.status != "SUCCESS") {
+                proxy.$modal.msgError("读取异常");
+              }
+            });
+          }
+        }
         state.loading = false;
-        pmReportReaders.value = requset.data.records[0].pmReportReaders;
-        state.tabsList[0].name = state.tabsList[0].name + "(" + pmReportReaders.value.read + ")";
-        state.tabsList[1].name = state.tabsList[1].name + "(" + pmReportReaders.value.unRead + ")";
-        reportDetailData.value.treeSelectNodes = proxy.$common.findTreeNodes(tree.value, tabsCurrent.value == 0 ? pmReportReaders.value.readAlready : pmReportReaders.value.readNotAlready);
-        var imgs = JSON.parse(dataList.value[0].reportImage);
-        var files = JSON.parse(dataList.value[0].reportFile);
-        imgs.forEach(function (item) {
-          state.images.push(item.url);
-        });
-        files.forEach(function (item) {
-          state.files.push(item.url);
-        });
-        load()
-      })
-      .catch((err) => {
+      }).catch((err) => {
         state.loading = false;
       });
   });
 }
+/**
+ * 
+ * @param item 数据重组
+*/
+function dataRebuild(item){
+  for(let i=0;i<item.length;i++){
+    item[i].tabsList = [
+      { name: "已读(" + item[i].pmReportReaders.read + ")", value: 0, 
+      treeSelectNodes:proxy.$common.findTreeNodes(tree.value, item[i].pmReportReaders.readAlready),num:item[i].pmReportReaders.read},
+      { name: "未读(" + item[i].pmReportReaders.unRead + ")", value: 1, 
+      treeSelectNodes:proxy.$common.findTreeNodes(tree.value,item[i].pmReportReaders.readNotAlready),num:item[i].pmReportReaders.read},
+    ];
+    item[i].tab = 0
+    var imgs = JSON.parse(item[i].reportImage);
+    var files = JSON.parse(item[i].reportFile);
+    imgs.forEach(function (val) {
+      item[i].images.push(val.url);
+    });
+    files.forEach(function (val) {
+      item[i].files.push(val.url);
+    });
+    dataList.value.push(item[i])
+  }
+  
+}
 /**
  * 跳转项目概览
  * @param id 项目id
@@ -229,7 +289,16 @@ function toProjectMange(id) {
  * @scrollView加载数据
  */
  function load() {
-  console.log(1111)
+  //下拉数据前将未读数据修改为已读
+  if(dataList.value.length > 1 && dataList.value[dataList.value.length -1].readFlag == 0){
+    projectApi()
+    .ReportRecordReadFlag({ reportId: dataList.value[dataList.value.length -1].id })
+    .then((res) => {
+      if (res.status != "SUCCESS") {
+        proxy.$modal.msgError("读取异常");
+      }
+    });
+  }
   projectApi().ReportRecord(
     {
       upOrDown:0,
@@ -238,7 +307,9 @@ function toProjectMange(id) {
       projectAscription:2
     }
   ).then((requset) => {
-    dataList.value.push(requset.data.records[0])
+    if(requset?.data?.records.length>0){
+      dataRebuild(requset.data.records);
+    }
   })
 }
 /**
@@ -253,11 +324,21 @@ function toProjectMange(id) {
       projectAscription:2
     }
   ).then((requset) => {
-    if(requset.data.records.length>0){
-      dataList.value.unshift(requset.data.records[0]);
+    if(requset?.data?.records.length>0){
+      dataRebuild(requset.data.records);
     }
   })
 }
+/** 更多按钮点击事件 */
+function moreClick(event) {
+  state.popup.show = true;
+  state.eventList = event;
+}
+/** 编辑、删除日报*/
+function handleSubmit(e) {
+  state.popup.show = true;
+  proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/detailsAll?submitterId=${e.submitterId}`);
+}
 onReady(() => {});
 
 onShow(() => {
@@ -313,9 +394,4 @@ onUnload(() => {
     }
   }
 }
-// .uni-scroll-view-content .content-area:nth-child(3){
-//   height:96px;
-//   overflow: hidden;
-//   background-image: linear-gradient(to top, #f3f2f2 30%, #fff 100%);
-// }
 </style>

+ 334 - 0
src/pages/business/common/projectMange/record/detailsAll.vue

@@ -0,0 +1,334 @@
+<template>
+  <u-navbar  :titleStyle="{ color: '#000' }" :autoBack="true" title="日报详情" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
+    <template #left>
+      <view class="u-navbar__content__left__item">
+        <u-icon name="arrow-left" size="20" color="#000" @click="returnTo('business/common/projectMange/record/index')"></u-icon>
+      </view>
+    </template>
+  </u-navbar>
+
+  <oa-scroll
+    customClass="record-container scroll-height"
+    :pageSize="pageSize"
+    :total="total"
+    :isSticky="true"
+    :customStyle="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: `calc(100vh - 44px)`,
+      //#endif
+      //#ifdef H5
+      height: `calc(100vh - 44px)`,
+      //#endif
+    }"
+    :refresherLoad="true"
+    :refresherEnabled="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :lowerThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @load="load"
+    @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="content-area radius bg-white" v-for="(item, index) in dataList" :key="index" style="margin-top: 6px">
+        <view class="content-area-header flex mb10">
+          <img :src="item?.avatar" class="content-area-header-avatarImg mr10" v-if="item?.avatar" />
+          <u-avatar
+            v-if="!item?.avatar"
+            class="content-area-header-avatar mr10"
+            :text="item.createBy.length > 2 ? item.createBy.slice(1, 3) : item.createBy"
+            shape="square"
+            size="40"
+            fontSize="12" 
+            color="#ffffff"
+            :bgColor="proxy.$settingStore.themeColor.color"
+          ></u-avatar>
+          <view>
+            <view class="content-area-header-title font16 mb5">{{ item.createBy ? item.createBy : " " }} {{ item.submitDate.slice(0, 10) != item.reportDate ? "( " + item.reportDate + " )" : "" }}</view>
+            <view class="content-area-header-time font14">{{ item.submitDate ? item.submitDate.replace("T", " ") : " " }}</view>
+          </view>
+        </view>
+
+        <view class="content-area-center mb10" v-for="child in item.workContents" :key="child">
+          <view class="content-area-center-top flex">
+            <view class="content-area-center-top-title mr10" style="color: #559aff" @click="toProjectMange(child.projectId)">{{ child.projectName ? child.projectName : " " }}</view>
+            <view class="content-area-center-top-time" :style="{ color: proxy.$settingStore.themeColor.color }">{{ child.workTime }}h</view>
+          </view>
+          <u-text :text="child.workContent" color="#000000" size="14"></u-text>
+        </view>
+        <view class="content-area-center mb10">
+          <view class="content-area-center-top"> 明日计划 </view>
+          <u-text :text="item.tomorrowPlan ? item.tomorrowPlan : '无'" color="#000000" size="14"></u-text>
+        </view>
+        <view class="content-area-center mb10">
+          <view class="content-area-center-top"> 工作协调 </view>
+          <u-text :text="item.coordinateWork ? item.coordinateWork : '无'" color="#000000" size="14"></u-text>
+        </view>
+        <view class="content-area-center mb10">
+          <view class="content-area-center-top">图片</view>
+          <view class="imageBox" v-if="JSON.parse(item.reportImage) && JSON.parse(item.reportImage).length > 0">
+            <image class="image m5" style="width: 50px" mode="widthFix" v-for="(a, index2) in JSON.parse(item.reportImage)" :key="index2" :src="a.url" @click="previewImage(index,index)" />
+          </view>
+          <view class="imageBox" v-else>无</view>
+        </view>
+
+        <view class="content-area-center mb10">
+          <view class="content-area-center-top">附件 </view>
+          <view v-if="JSON.parse(item.reportFile) && JSON.parse(item.reportFile).length > 0">
+            <uni-link v-for="(file, index2) in JSON.parse(item.reportFile)" :key="index2" :href="file.url" text="file.url" style="color: rgba(0, 0, 0, 0.7)">{{ file.name }}</uni-link>
+          </view>
+          <view v-else>无</view>
+        </view>
+        <view class="content-area-center mb10" style="display: flex; flex-wrap: wrap" v-if="item.pmReportReaders.read > 0 || item.pmReportReaders.unRead > 0">
+          <u-tabs
+            :list="item.tabsList"
+            :current="item.tab"
+            @click="tabsClick(index, $event.value)"
+            lineColor="#333"
+            :activeStyle="{ color: '#333', fontSize: '14px' }"
+            :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+            :scrollable="false"
+            style="width: 100%"
+          ></u-tabs>
+          <view class="content-area-header mt20 mb10 text-center" style="display: inline-block" v-for="(item2, index2) in item.tabsList[item.tab].treeSelectNodes" :key="index2">
+            <img v-if="item2?.avatar" class="content-area-header-avatarImg mlr5" :src="item2.avatar" style="display: block; width: 40px; height: 40px" />
+            <u-avatar
+              v-if="!item2.avatar"
+              class="content-area-header-avatar mlr5"
+              :text="item2.nickName.length > 2 ? item2.nickName.slice(1, 3) : item2.nickName"
+              shape="square"
+              size="40"
+              fontSize="12"
+              color="#ffffff"
+              :bgColor="proxy.$settingStore.themeColor.color"
+            ></u-avatar>
+            <u-text :text="item2.nickName" color="#000000" size="14" align="center"></u-text>
+          </view>
+        </view>
+      </view>
+    </template>
+
+  </oa-scroll>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onReady, onHide, onLaunch, onBackPress, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { projectApi } from "@/api/business/project.js";
+import { dUserList } from "@/api/system/user.js";
+import { deptUserTreeSelect } from "@/api/system/user.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const tree = ref({
+  value: "tree_root",
+  label: "Root",
+  children: [],
+});
+const reportDetailData = ref([]);
+const pmReportReaders = ref([]); //已读未读集合
+const state = reactive({
+  loading: true,
+  dataList: [], //日报列表
+  options: {
+    //日报详情参数
+    reportId: "",
+  },
+  userData: [], //用户列表
+  pageSize:1,
+  pageNum:0,
+  total:0,
+  submitDate:undefined,
+});
+
+const { dataList, userData, tabsList, tabsCurrent, pageSize, pageNum, total, } = toRefs(state);
+  /**
+ * 返回上级页面
+ * @param defaultPage 默认页面
+ */
+ function returnTo(defaultPage) {
+    if(getCurrentPages().length > 1){
+      uni.navigateBack()
+    }else{
+      uni.redirectTo({
+        url: `/pages/${defaultPage}`
+      })
+    }
+  }
+/**
+ * @tabs点击事件
+ */
+function tabsClick(index,e) {
+  dataList.value[index].tab = e
+}
+function previewImage(index1,index2) {
+  uni.previewImage({
+    current: index2, // 当前显示图片索引
+    urls: dataList.value[index1].images[index2], // 需要预览的图片http链接列表
+  });
+}
+
+/**
+ * @初始化
+ */
+function init() {
+  dataList.value = [];
+  state.loading = true;
+  /** 查询树结构用户列表  回显抄送人*/
+  deptUserTreeSelect({ pageNum: "1", pageSize: "1000" }).then((res) => {
+    tree.value = res.data;
+    projectApi()
+      .ReportRecord({
+        pageNum: ++ pageNum.value ,
+        pageSize: 1,
+        projectAscription:2,
+        submitterId:state.options.submitterId,
+      })
+      .then((requset) => {
+        if(requset?.data?.records.length>0){
+          total.value = requset.data.total;
+          dataRebuild(requset.data.records);
+          if(requset.data.records[0].readFlag == "0"){
+            projectApi()
+            .ReportRecordReadFlag({ reportId: requset.data.records[0].id })
+            .then((res) => {
+              if (res.status != "SUCCESS") {
+                proxy.$modal.msgError("读取异常");
+              }
+            });
+          }
+        }
+        state.loading = false;
+      }).catch((err) => {
+        state.loading = false;
+      });
+  });
+}
+/**
+ * 
+ * @param item 数据重组
+*/
+function dataRebuild(item){
+  for(let i=0;i<item.length;i++){
+    item[i].tabsList = [
+      { name: "已读(" + item[i].pmReportReaders.read + ")", value: 0, 
+      treeSelectNodes:proxy.$common.findTreeNodes(tree.value, item[i].pmReportReaders.readAlready),num:item[i].pmReportReaders.read},
+      { name: "未读(" + item[i].pmReportReaders.unRead + ")", value: 1, 
+      treeSelectNodes:proxy.$common.findTreeNodes(tree.value,item[i].pmReportReaders.readNotAlready),num:item[i].pmReportReaders.read},
+    ];
+    item[i].tab = 0
+    var imgs = JSON.parse(item[i].reportImage);
+    var files = JSON.parse(item[i].reportFile);
+    imgs.forEach(function (val) {
+      item[i].images.push(val.url);
+    });
+    files.forEach(function (val) {
+      item[i].files.push(val.url);
+    });
+    dataList.value.push(item[i])
+  }
+  
+}
+/**
+ * 跳转项目概览
+ * @param id 项目id
+ */
+function toProjectMange(id) {
+  proxy.$tab.navigateTo(`/pages/business/common/projectMange/overview/index?id=${id}`);
+}
+/**
+ * @scrollView加载数据
+ */
+ function load() {
+  //下拉数据前将未读数据修改为已读
+  if(dataList.value.length > 1 && dataList.value[dataList.value.length -1].readFlag == 0){
+    projectApi()
+    .ReportRecordReadFlag({ reportId: dataList.value[dataList.value.length -1].id })
+    .then((res) => {
+      if (res.status != "SUCCESS") {
+        proxy.$modal.msgError("读取异常");
+      }
+    });
+  }
+  projectApi().ReportRecord(
+    {
+      pageNum: ++ pageNum.value ,
+      pageSize: 1,
+      projectAscription:2,
+      submitterId:state.options.submitterId,
+    }
+  ).then((requset) => {
+    if(requset?.data?.records.length>0){
+      dataRebuild(requset.data.records);
+    }
+  })
+}
+/**
+ * @scrollView刷新数据
+ */
+ function refresh() {
+  projectApi().ReportRecord(
+    {
+      pageNum: ++ pageNum.value ,
+      pageSize: 1,
+      projectAscription:2,
+      submitterId:state.options.submitterId,
+    }
+  ).then((requset) => {
+    if(requset?.data?.records.length>0){
+      dataRebuild(requset.data.records);
+    }
+  })
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  state.options.submitterId = options?.submitterId;
+  init();
+});
+</script>
+
+<style lang="scss" scoped>
+.content-area {
+  margin: 0;
+  padding: 15px 20px;
+  overflow: hidden;
+
+  &-header {
+    &-avatar {
+      margin: auto 0;
+    }
+    &-avatarImg {
+      width: 35px;
+      height: 35px;
+      border-radius: 4px;
+    }
+
+    &-title {
+      margin: 0 0 15px 0;
+      font-weight: 600;
+      color: #000000;
+    }
+  }
+
+  &-center {
+    line-height: 25px;
+    &-top {
+      color: #000000;
+      font-weight: 600;
+    }
+  }
+}
+</style>

+ 6 - 15
src/pages/business/common/projectMange/record/index.vue

@@ -118,6 +118,7 @@
         @click="handleSubmit('update', eventList)"
       ></u-button>
       <u-button
+        v-if="state.tabsCurrent == 1"
         class="custom-style"
         type="info"
         size="normal"
@@ -158,7 +159,7 @@
           borderRadius: 0,
           borderBottomWidth: '1px',
         }"
-        @click="handleSubmit('update', eventList)"
+        @click="handleSubmit('all', eventList)"
       ></u-button>
       <u-button
         class="custom-style"
@@ -330,19 +331,7 @@ function init() {
  * @跳转详情
  */
 function goContentDetails(e) {
-  if (state.tabsCurrent == 0 && e.readFlag != 1) {
-    projectApi()
-      .ReportRecordReadFlag({ reportId: e.id })
-      .then((res) => {
-        if (res.status == "SUCCESS") {
-          proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.id}`);
-        } else {
-          proxy.$modal.msgError("读取异常");
-        }
-      });
-  } else {
-    proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.id}`);
-  }
+  proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.id}`);
 }
 
 /**
@@ -435,8 +424,10 @@ function handleSubmit(type, item) {
       .catch((errors) => {
         proxy.$modal.msg(errors);
       });
+  }else if (type === "all") {
+    proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/detailsAll?submitterId=${item.submitterId}`);
+    state.modal.show = false;
   }
-  state.modalShow = false;
 }
 
 onReady(() => {});

+ 0 - 1
src/pages/login.vue

@@ -180,7 +180,6 @@ function init() {
   useStore.GetWxOpenId(1); //调用获取微信公众号openId
 
   if (window.location.host.indexOf("localhost") != -1) {
-    linkUrl.value = "192.168.10.165:13200";
     useStore.GetMobileTenantConfig({ url: linkUrl.value });
   } else {
     linkUrl.value = window.location.host;