فهرست منبع

Merge branch 'develop' into prod

scorpio 2 سال پیش
والد
کامیت
2ce15213f2

+ 14 - 0
src/api/dash/index.js

@@ -43,5 +43,19 @@ export default {
    */
   updateAvatar(params) {
     return fetch('/blade-user/update', params, 'post', 'json')
+  },
+  /**
+   * 通知消息列表
+   * @returns {Promise | Promise<unknown>}
+   */
+  noticeList(params) {
+    return fetch('/wutong-base/notice/list', params, 'get')
+  },
+  /**
+   * 通知消息详情
+   * @returns {Promise | Promise<unknown>}
+   */
+  noticeDetail(params) {
+    return fetch('/wutong-base/notice/detail', params, 'get')
   }
 }

+ 7 - 1
src/api/resource/index.js

@@ -126,9 +126,15 @@ export default {
    * @param id
    * @returns {Promise<unknown>}
    */
-  fileDetail(id) {
+  fileDetailByFile(id) {
     return fetch('/wutong-library/library/detail/file/' + id)
   },
+  fileDetail(id) {
+    return fetch('/wutong-library/library/detail/' + id)
+  },
+  fileInfo(params) {
+    return fetch('/wutong-file/file/detail', params)
+  },
   /**
    * 删除文件
    * @param params

+ 1 - 1
src/views/dash/compoents/agency.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="full-width flex flex-col">
     <div class="bold font-16 full-width text-left">{{ title }}</div>
-    <el-empty class="padding-bottom" description="暂无数据"></el-empty>
+    <el-empty description="暂无数据"></el-empty>
   </div>
 </template>
 

+ 5 - 5
src/views/dash/compoents/data_show.vue

@@ -8,29 +8,29 @@
     </div>
     <div
       class="flex flex-center flex-justify-between mb-15 ml-20"
-      style="margin-top: 65px"
+      style="margin-top: 50px"
     >
       <div class="flex flex-col flex-center">
         <span class="bold">全部项目数</span>
-        <span class="mt-10 font-34 main-color"
+        <span class="mt-15 font-34 main-color"
           >{{ data.projectCount }}<span class="font-13 black"> 个</span></span
         >
       </div>
       <div class="flex flex-col flex-center">
         <span class="bold">全部报告数</span>
-        <span class="mt-10 font-34 main-color"
+        <span class="mt-15 font-34 main-color"
           >{{ data.fileCount }}<span class="font-13 black"> 篇</span></span
         >
       </div>
       <div class="flex flex-col flex-center">
         <span class="bold">我的项目数</span>
-        <span class="mt-10 font-34 main-color"
+        <span class="mt-15 font-34 main-color"
           >{{ data.myProjectCount }}<span class="font-13 black"> 个</span></span
         >
       </div>
       <div class="flex flex-col flex-center mr-20">
         <span class="bold">我的报告数</span>
-        <span class="mt-10 font-34 main-color"
+        <span class="mt-15 font-34 main-color"
           >{{ data.myFileCount }}<span class="font-13 black"> 篇</span></span
         >
       </div>

+ 22 - 16
src/views/dash/compoents/notice.vue

@@ -1,14 +1,20 @@
 <template>
   <div class="flex flex-center flex-justify-start">
-    <el-icon class="mr-10">
+    <el-icon class="mr-10" color="#A3773D" size="18">
       <Bell />
     </el-icon>
     <div class="roll full-width">
       <ul :class="{ marquee_top: animate }">
-        <li v-for="(item, index) in msg" :key="index">
-          <span class="main-color">
-            <span>{{ item.title }}</span>
-          </span>
+        <li v-for="(item, index) in data" :key="index" class="pointer">
+          <div class="flex flex-center flex-justify-between">
+            <preview :id="item.fileId">
+              <template #title>
+                <div class="main-color">
+                  {{ item.title }}
+                </div>
+              </template>
+            </preview>
+          </div>
         </li>
       </ul>
     </div>
@@ -16,18 +22,18 @@
 </template>
 
 <script>
+import preview from '@/views/resource/component/preview.vue'
+
 export default {
-  components: {},
+  components: { preview },
+  props: {
+    data: {
+      type: Array,
+      default: null
+    }
+  },
   data() {
     return {
-      msg: [
-        {
-          title: '系统更新公告'
-        },
-        {
-          title: '政策性银行融资培训'
-        }
-      ],
       animate: false,
       setInTime: '' // 定时器
     }
@@ -43,8 +49,8 @@ export default {
     showMarquee() {
       this.animate = true
       setTimeout(() => {
-        this.msg.push(this.msg[0])
-        this.msg.shift()
+        this.data.push(this.data[0])
+        this.data.shift()
         this.animate = false
       }, 500)
     }

+ 98 - 0
src/views/dash/compoents/owner.vue

@@ -0,0 +1,98 @@
+<template>
+  <div class="flex full-width flex-col">
+    <div class="flex flex-center full-width flex-justify-between">
+      <span class="bold font-16">{{ user.info.deptName }}</span>
+      <span class="font-13 grey-9 mr-10">数据统计时间:{{ date }}</span>
+    </div>
+    <div
+      class="flex flex-center flex-justify-between mb-15 ml-20"
+      style="margin-top: 50px"
+    >
+      <div class="flex flex-col flex-center">
+        <span class="bold">年度责任目标</span>
+        <span class="mt-15 font-34 main-color"
+          >{{ info.plan_complete_amount
+          }}<span class="font-13 black">万元</span></span
+        >
+      </div>
+      <div class="flex flex-col flex-center">
+        <span class="bold">累计完成投资</span>
+        <span class="mt-15 font-34 main-color"
+          >{{ info.total_complete_amount
+          }}<span class="font-13 black">万元</span></span
+        >
+      </div>
+      <div class="flex flex-col flex-center">
+        <span class="bold">投资完成比例</span>
+        <span class="mt-15 font-34 main-color"
+          >{{ info.rate }}<span class="font-13 black"></span
+        ></span>
+      </div>
+      <div class="flex flex-col flex-center mr-20">
+        <span class="bold">当月计划投资</span>
+        <span class="mt-15 font-34 main-color"
+          >{{ info.month_plan_complete_amount
+          }}<span class="font-13 black">万元</span></span
+        >
+      </div>
+      <div class="flex flex-col flex-center mr-20">
+        <span class="bold">当月完成投资</span>
+        <span class="mt-15 font-34 main-color"
+          >{{ info.month_total_complete_amount
+          }}<span class="font-13 black">万元</span></span
+        >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { useStore } from '@/store/user.js'
+
+export default {
+  name: 'owner',
+  setup() {
+    const user = useStore()
+    return { user }
+  },
+  data() {
+    return {
+      date: '',
+      year: '',
+      info: {}
+    }
+  },
+  created() {
+    this.fetch()
+    // 获取当前日期
+    const date = new Date()
+    let nowMonth = date.getMonth() + 1
+    let strDate = date.getDate()
+    const seperator = '-'
+    if (nowMonth >= 1 && nowMonth <= 9) {
+      nowMonth = '0' + nowMonth
+    }
+    if (strDate >= 0 && strDate <= 9) {
+      strDate = '0' + strDate
+    }
+    this.date = date.getFullYear() + seperator + nowMonth + seperator + strDate
+  },
+  methods: {
+    fetch() {
+      let params = {
+        deptId: this.user.info.deptId,
+        year: new Date().getFullYear()
+      }
+      this.$api.invest.homeInvest(params).then(res => {
+        if (res.code === 200) {
+          this.info = res.data
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss"></style>

+ 6 - 11
src/views/dash/compoents/read.vue

@@ -5,17 +5,12 @@
       <div class="flex flex-center ml-10" style="flex: 5">
         <div
           class="flex flex-col flex-center border radius box-shadow mr-15 mt-15"
-          v-for="item in 4"
+          v-for="item in data"
         >
           <div>
-            <img
-              src="../../../assets/img/code.png"
-              style="width: 50px; height: 120px"
-            />
-          </div>
-          <div class="bold padding">
-            文章标题文章标题文章标题文章标题文章标题文章标题文章标题
+            <img :src="item.thumb_url" style="width: 50px; height: 120px" />
           </div>
+          <div class="bold padding">{{ item.author }}</div>
           <div class="lines-2 lines-height-15 grey-9 padding">
             文章内容文章内容文章内容文章内容文章内容文章内容
           </div>
@@ -24,8 +19,8 @@
 
       <div class="flex flex-center flex-col" style="flex: 1">
         <img
-          src="../../../assets/img/code.png"
-          style="width: 80px; height: 80px"
+          src="https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/4a721f77f9c24f55bacfe032b8060ba8.jpg"
+          style="width: 180px; height: 180px"
         />
         <span class="mt-10 font-13"
           >微信扫描关注公众号<br />及时掌握更多资讯</span
@@ -50,7 +45,7 @@ export default {
     getList() {
       this.$api.dash.mpList().then(res => {
         if (res.code === 200) {
-          console.log(res)
+          // this.data = res.data[0].content
         } else {
           console.log(res)
         }

+ 47 - 8
src/views/dash/index.vue

@@ -2,10 +2,13 @@
   <div>
     <el-card :shadow="hover">
       <div class="full-width flex flex-center flex-justify-start">
-        <notice :data="[333, 44]" />
+        <notice :data="noticeList" />
       </div>
     </el-card>
-    <div class="flex flex-center flex-justify-between">
+    <div
+      v-if="user.info.type === 4"
+      class="flex flex-center flex-justify-between"
+    >
       <el-card :shadow="hover" class="flex-child-average mt-20 card1">
         <profile />
       </el-card>
@@ -14,11 +17,18 @@
         <data-show />
       </el-card>
     </div>
+    <el-card
+      v-if="user.info.type === 3"
+      :shadow="hover"
+      class="flex-child-average mt-20 card1"
+    >
+      <owner />
+    </el-card>
     <div class="flex flex-center flex-justify-between">
       <el-card
         :shadow="hover"
         class="flex-child-average mt-20"
-        style="height: 300px"
+        style="height: 350px"
       >
         <agency :type="1" />
       </el-card>
@@ -26,14 +36,14 @@
       <el-card
         :shadow="hover"
         class="flex-child-average mt-20"
-        style="height: 300px"
+        style="height: 350px"
       >
         <agency :type="2" />
       </el-card>
     </div>
-    <!--    <el-card :shadow="hover" class="mt-20">-->
-    <!--      <read />-->
-    <!--    </el-card>-->
+    <el-card :shadow="hover" class="mt-20">
+      <read />
+    </el-card>
   </div>
 </template>
 
@@ -45,14 +55,43 @@ name: '首页',
 </route>
 
 <script>
+import { useStore } from '@/store/user.js'
 import Profile from '@/views/dash/compoents/profile.vue'
 import dataShow from '@/views/dash/compoents/data_show.vue'
 import agency from '@/views/dash/compoents/agency.vue'
 import read from '@/views/dash/compoents/read.vue'
 import notice from '@/views/dash/compoents/notice.vue'
+import owner from '@/views/dash/compoents/owner.vue'
 
 export default {
-  components: { Profile, dataShow, agency, read, notice }
+  components: { Profile, dataShow, agency, read, notice, owner },
+  setup() {
+    const user = useStore()
+    return { user }
+  },
+  data() {
+    return {
+      page: {
+        size: 10,
+        current: 1
+      },
+      noticeList: []
+    }
+  },
+  created() {
+    this.getNotice()
+  },
+  methods: {
+    getNotice() {
+      this.$api.dash.noticeList(this.page).then(res => {
+        if (res.code === 200) {
+          this.noticeList = res.data.records
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    }
+  }
 }
 </script>
 

+ 129 - 0
src/views/home/component/task.vue

@@ -0,0 +1,129 @@
+<template>
+  <div>
+    <el-form :rules="rules" :model="form">
+      <el-form-item label="任务名称" prop="title">
+        <el-input v-model="form.title" placeholder="请填写任务名称"></el-input>
+      </el-form-item>
+      <el-form-item label="任务说明" prop="remark">
+        <el-input
+          v-model="form.remark"
+          type="textarea"
+          :rows="6"
+          placeholder="请填写任务说明"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="任务期限">
+        <el-date-picker
+          v-model="form.date"
+          type="daterange"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="截止日期"
+          format="YYYY-MM-DD"
+          value-format="YYYY-MM-DD"
+        />
+      </el-form-item>
+      <div class="full-width flex flex-align-center mt-10">
+        <span class="font-14 bold">生成二维码</span>
+        <el-button
+          circle
+          class="ml-20"
+          icon="Picture"
+          type="danger"
+          @click="initCode()"
+        />
+      </div>
+      <div
+        class="full-width mt-20 border-top padding-top flex flex-justify-end"
+      >
+        <el-button @click="close">取消</el-button>
+        <el-button type="primary" @click="close">关闭</el-button>
+      </div>
+    </el-form>
+    <el-dialog v-model="qrCodeShow" width="400px">
+      <div
+        class="flex flex-col flex-center"
+        style="height: 400rpx; width: 400rpx"
+      >
+        <vue-qr
+          :currentLevel="3"
+          :logoCornerRadius="4"
+          :logoScale="0.25"
+          :text="qrCodeText"
+          size="340"
+        />
+        <span>右键复制二维码,通过微信进行分享</span>
+        <span>{{ qrCodeText }}</span>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import VueQr from 'vue-qr/src/packages/vue-qr.vue'
+import { objectToParams } from '@/utils/tools.js'
+export default {
+  name: 'task',
+  components: { VueQr },
+  props: {
+    projectId: {
+      type: String,
+      default: ''
+    },
+    folders: {
+      type: Array,
+      default: []
+    }
+  },
+  data() {
+    return {
+      qrCodeText: '',
+      qrCodeShow: false,
+      rules: {
+        title: [{ required: true, message: '请输入任务名称', trigger: 'blur' }],
+        remark: [{ required: true, message: '请输入任务说明', trigger: 'blur' }]
+      },
+      form: {
+        title: '',
+        remark: '',
+        date: '',
+        taskStartTime: '',
+        taskEndTime: ''
+      }
+    }
+  },
+  methods: {
+    initCode() {
+      // this.qrCodeShow = true
+      if (this.form.date.length !== 2) {
+        this.$message.error('请按要求选择时间段')
+        return
+      }
+      this.form.folderIds = this.folders.map(sub => sub.id)
+      this.form.taskStartTime = this.form.date[0]
+      this.form.taskEndTime = this.form.date[1]
+      this.form.projectId = this.projectId
+      this.$api.task.add(this.form).then(res => {
+        if (res.code === 200) {
+          this.$message.success(res.msg)
+          this.qrCodeShow = true
+          const data = res.data
+          this.qrCodeText =
+            'https://prod.wutongshucloud.com/apply?id=' +
+            data.qrcodeId +
+            '&' +
+            objectToParams(res.data)
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    close() {
+      this.$emit('close')
+    }
+  }
+}
+</script>
+
+<style scoped></style>

+ 3 - 0
src/views/resource/component/floder.vue

@@ -49,6 +49,9 @@ export default {
 
   methods: {
     folderAdd() {
+      if (this.title.length === 0) {
+        return
+      }
       const data = {
         projectId: this.info.projectId,
         stageId: this.info.stageId,

+ 63 - 35
src/views/resource/component/preview.vue

@@ -1,6 +1,10 @@
 <template>
   <div>
-    <el-button type="primary" text @click="openFile">查看</el-button>
+    <div @click="detail">
+      <slot name="title">
+        <el-button type="primary" text>查看</el-button>
+      </slot>
+    </div>
     <el-image-viewer
       v-if="showImage"
       :url-list="preList"
@@ -16,24 +20,26 @@
       </template>
       <div>
         <div v-if="data">
-          <el-empty
-            v-if="data.imgs.length === 0"
-            style="height: 90vh"
-            description="暂时无法预览,您可以点击 下载 按钮,下载原文件 "
-            class="full-height flex flex-center"
-          />
+          <div v-if="data.imgs.length === 0" class="flex flex-center">
+            <div v-html="data.content" class="preview"></div>
+          </div>
           <div v-else v-for="item in data.imgs" :key="item.id">
             <img :src="item.filePath" style="width: 1100px" />
           </div>
         </div>
         <div
           class="bottom flex flex-center flex-justify-center"
-          v-if="info.isAccess === 2 || showAction"
+          v-if="isAccess === 2 || showAction"
         >
           <el-button type="primary" icon="Download" @click="downloadClick"
             >下 载</el-button
           >
-          <share class="ml-20" :row="info" v-if="info.isAccess === 2" />
+          <share
+            class="ml-20"
+            :project-id="projectId"
+            :ids="id"
+            v-if="isAccess === 2"
+          />
         </div>
       </div>
     </el-drawer>
@@ -49,25 +55,29 @@ export default {
     share
   },
   props: {
+    title: {
+      type: String,
+      default: () => {
+        return ''
+      }
+    },
+    isAccess: {
+      type: Number,
+      default: 3
+    },
     showAction: {
       type: Boolean,
       default: false
     },
-    info: {
-      type: Object,
+    projectId: {
+      type: String,
+      default: ''
+    },
+    id: {
+      type: String,
       default: null
     }
   },
-  watch: {
-    show: {
-      handler(val) {
-        if (val) {
-          this.detail()
-        }
-      },
-      immediate: true
-    }
-  },
   data() {
     return {
       show: false,
@@ -77,28 +87,42 @@ export default {
     }
   },
   methods: {
-    openFile() {
-      if (api.offices.includes(this.info.suffix)) {
-        this.show = true
-      } else {
-        this.preList.length = 0
-        this.preList.push(this.info.url)
-        this.showImage = true
-      }
-    },
     detail() {
-      this.$api.resource
-        .fileDetail(this.info.fileId ? this.info.fileId : this.info.id)
-        .then(res => {
+      if (Number(this.id, 10).toString() === 'NaN') {
+        // 如果id 不是数字开头,即mongo 62开头的id,查看文章详情
+        this.$api.resource.fileDetail(this.id).then(res => {
           if (res.code === 200) {
             this.data = res.data
+            this.show = true
+          }
+        })
+      } else {
+        this.$api.resource.fileInfo({ id: this.id }).then(res => {
+          if (res.code === 200) {
+            const tmp = res.data
+            if (api.offices.includes(tmp.suffix)) {
+              this.openByFile()
+            } else {
+              this.preList.length = 0
+              this.preList.push(tmp.filePath)
+              this.showImage = true
+            }
           }
         })
+      }
+    },
+    openByFile() {
+      this.$api.resource.fileDetailByFile(this.id).then(res => {
+        if (res.code === 200) {
+          this.data = res.data
+          this.show = true
+        }
+      })
     },
     async downloadClick() {
       const link = document.createElement('a')
-      link.href = this.info.url
-      link.download = this.info.title
+      link.href = this.data.url
+      link.download = this.data.title
       link.click()
     }
   }
@@ -106,6 +130,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.preview {
+  width: 960px;
+  padding: 20px;
+}
 .bottom {
   position: fixed;
   bottom: 0;

+ 0 - 8
src/views/resource/component/row1.vue

@@ -4,14 +4,6 @@
       v-if="index === 0"
       class="flex flex-align-center full-height cell full-width"
     >
-      <!--      <el-checkbox-->
-      <!--        v-if="showCheckBox"-->
-      <!--        v-model="info.checked"-->
-      <!--        :disabled="folderChecked === false && row.type === 2"-->
-      <!--        class="padding-right"-->
-      <!--        @change="rowChecked(row)"-->
-      <!--      />-->
-
       <div v-if="showCheckBox" class="margin">
         <el-icon
           v-if="folderChecked === false && row.type === 2"

+ 13 - 7
src/views/resource/component/share.vue

@@ -37,8 +37,14 @@ export default {
     VueQr
   },
   props: {
-    row: {
-      type: Object,
+    projectId: {
+      required: true,
+      type: String,
+      default: null
+    },
+    ids: {
+      required: true,
+      type: String,
       default: null
     }
   },
@@ -55,27 +61,27 @@ export default {
   data() {
     return {
       show: false,
-      url: 'http://localhost:5173/resource?id=64b79edd8ce2593744685a3e&type=0',
       logoSrc: new URL('@/assets/img/logo.png', import.meta.url).href,
       qrCodeText: '',
       deptId: ''
     }
   },
   mounted() {
-    // fixme 项目经理
     this.getProjectInfo()
   },
   methods: {
     getProjectInfo() {
-      this.$api.project.projectInfo(this.row.projectId).then(res => {
+      if (this.projectId.length === 0) {
+        return
+      }
+      this.$api.project.projectInfo(this.projectId).then(res => {
         if (res.code === 200) {
-          console.log(res)
           this.deptId = res.data.createDept
         }
       })
     },
     getQrCode() {
-      this.$api.resource.shareFiles({ ids: this.row.id }).then(res => {
+      this.$api.resource.shareFiles({ ids: this.ids }).then(res => {
         if (res.code === 200) {
           this.qrCodeText =
             website.baseUrl +

+ 7 - 1
src/views/resource/component/xtable.vue

@@ -56,7 +56,13 @@
                 class="flex flex-center"
               >
                 <div>
-                  <preview :info="row" v-if="row.type === 1" ref="preview" />
+                  <preview
+                    :id="row.fileId"
+                    :is-access="row.isAccess"
+                    :project-id="row.projectId"
+                    v-if="row.type === 1"
+                    ref="preview"
+                  />
                 </div>
                 <div v-if="row.isAccess === 2" class="flex flex-center">
                   <div v-if="row.type === 2 && row.parentId === '0'">

+ 9 - 9
src/views/task/component/task-table.vue

@@ -172,31 +172,31 @@ export default {
       status: [
         {
           title: '待确认',
-          value: 0,
+          value: 1,
           color: '#D7D7D7',
           checked: true
         },
         {
           title: '进行中',
-          value: 1,
+          value: 2,
           color: '#47A6EA',
           checked: false
         },
         {
           title: '已提交',
-          value: 2,
+          value: 3,
           color: '#ECAB56',
           checked: false
         },
         {
           title: '已完成',
-          value: 3,
+          value: 4,
           color: '#80B336',
           checked: false
         },
         {
           title: '已取消',
-          value: 4,
+          value: 5,
           color: '#C72A29',
           checked: false
         }
@@ -204,25 +204,25 @@ export default {
       level: [
         {
           title: 'P1',
-          value: 0,
+          value: 1,
           color: '#C72A29',
           checked: true
         },
         {
           title: 'P2',
-          value: 1,
+          value: 2,
           color: '#E89D42',
           checked: false
         },
         {
           title: 'P3',
-          value: 2,
+          value: 3,
           color: '#47A6EA',
           checked: false
         },
         {
           title: 'P4',
-          value: 3,
+          value: 4,
           color: '#A0A0A0',
           checked: false
         }

+ 17 - 19
src/views/task/component/task.vue

@@ -118,7 +118,7 @@
               <div v-for="item in fileList" :key="item.id">
                 <div class="flex flex-center">
                   {{ item.title }}
-                  <preview :info="item" :show-action="true" />
+                  <preview :id="item.fileId" :show-action="true" />
                 </div>
               </div>
             </div>
@@ -149,7 +149,7 @@
               <div class="flex flex-justify-start flex-center">
                 {{ item.fileVO.originalFileName }}
                 ({{ item.createUserName }})
-                <preview :info="item.fileVO" :show-action="true"></preview>
+                <preview :id="item.fileVO.id" :show-action="true"></preview>
               </div>
             </div>
           </div>
@@ -241,31 +241,31 @@ export default {
       status: [
         {
           title: '待确认',
-          value: 0,
+          value: 1,
           color: '#D7D7D7',
           checked: true
         },
         {
           title: '进行中',
-          value: 1,
+          value: 2,
           color: '#47A6EA',
           checked: false
         },
         {
           title: '已提交',
-          value: 2,
+          value: 3,
           color: '#ECAB56',
           checked: false
         },
         {
           title: '已完成',
-          value: 3,
+          value: 4,
           color: '#80B336',
           checked: false
         },
         {
           title: '已取消',
-          value: 4,
+          value: 5,
           color: '#C72A29',
           checked: false
         }
@@ -273,25 +273,25 @@ export default {
       level: [
         {
           title: 'P1',
-          value: 0,
+          value: 1,
           color: '#C72A29',
           checked: true
         },
         {
           title: 'P2',
-          value: 1,
+          value: 2,
           color: '#E89D42',
           checked: false
         },
         {
           title: 'P3',
-          value: 2,
+          value: 3,
           color: '#47A6EA',
           checked: false
         },
         {
           title: 'P4',
-          value: 3,
+          value: 4,
           color: '#A0A0A0',
           checked: false
         }
@@ -301,17 +301,15 @@ export default {
   methods: {
     init() {
       this.form = this.task
-      console.log(this.task)
       if (this.task.users !== undefined) {
         this.executeUser = [...this.task.users]
       }
       this.canEdit = this.form.createUser === this.user.info.userId
-      if (this.task.taskStatus > 1) {
+      if (this.task.taskStatus > 2) {
         this.canEdit = false
       }
       if (this.task.files !== undefined && this.task.files.length > 0) {
         this.fileList = this.task.files
-        console.log(this.fileList)
       }
       this.resultFileInfo()
     },
@@ -333,13 +331,13 @@ export default {
     show(type) {
       if (type !== 1) {
         this.form = this.task
-        if (this.task.taskStatus === 3 || this.task.taskStatus === 4) {
+        if (this.task.taskStatus === 4 || this.task.taskStatus === 5) {
           this.isFinish = true
         }
         this.init(this.task)
       } else {
-        this.form.taskStatus = 0
-        this.form.level = 0
+        this.form.taskStatus = 1
+        this.form.level = 1
         this.canEdit = true
       }
       this.showDialog = true
@@ -364,7 +362,7 @@ export default {
       }
     },
     submit() {
-      if (this.form.taskStatus === 2 && this.resultFiles.length === 0) {
+      if (this.form.taskStatus === 3 && this.resultFiles.length === 0) {
         this.$message.error('请上传成果文件')
         return
       } else {
@@ -372,7 +370,7 @@ export default {
       }
 
       if (
-        this.form.taskStatus === 3 &&
+        this.form.taskStatus === 4 &&
         this.isMove === false &&
         this.isFinish === false
       ) {

+ 4 - 3
src/views/user/manage.vue

@@ -200,7 +200,6 @@
             size="220"
           />
           <span>- 复制二维码图片,通过微信发送邀请 -</span>
-          {{ qrCodeText }}
         </div>
         <el-empty v-else description="暂无数据" />
       </div>
@@ -337,6 +336,7 @@ export default {
       this.page.current = this.page.currentPage
       this.page.size = this.page.pageSize
       const data = { deptId: this.user.info.deptId }
+      console.log(this.page)
       this.$api.role
         .roleList(Object.assign(this.page, data))
         .then(res => {
@@ -551,10 +551,11 @@ export default {
       this.$api.role.invitation({ deptId, type: 4 }).then(res => {
         if (res.code === 200) {
           this.qrCodeText =
-            'https://prod.wutongshucloud.com/invite?id=' +
+            'https://prod.wutongshucloud.com/apply?id=' +
             res.data.id +
             '&deptId=' +
-            deptId
+            deptId +
+            '&roleName=股室'
         }
       })
     },