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

+ 1 - 2
index.html

@@ -4,12 +4,11 @@
     <meta charset="UTF-8" />
     <link rel="icon" type="image/svg+xml" href="/vite.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>梧桐树项目管理平台</title>
+    <title>梧桐树项目管理服务</title>
   </head>
   <body style='background-color: #f6f7f8'>
     <div id="app"></div>
     <script type="module" src="/src/main.js">
-      console.info('%c由%cFantastic-admin%c提供支持', 'font-size: 14px; margin-bottom: 2px; padding: 6px 8px; color: #fff; background: #707070;', 'font-size: 14px; margin-bottom: 2px; padding: 6px 8px; color: #fff; background: #e24329;', 'font-size: 14px; margin-bottom: 2px; padding: 6px 8px; color: #fff; background: #707070;', '\nhttps://gitee.com/hooray/fantastic-admin')
     </script>
   </body>
 </html>

+ 0 - 1
src/App.vue

@@ -50,7 +50,6 @@ export default {
   },
   mounted() {
     window.addEventListener('scroll', this.menu)
-    console.log(import.meta.env.DEV)
   },
   methods: {
     router,

+ 14 - 1
src/api/store/index.js

@@ -1,4 +1,5 @@
 import fetch from '../fetch.js'
+import params from '@/api/params/index.js'
 
 export default {
   /**
@@ -76,7 +77,19 @@ export default {
     return fetch(
       '/blade-project-manage-v2/project-dispatch/v2/add-warning',
       params,
-      'post'
+      'post',
+      'json'
+    )
+  },
+  /**
+   * 预警问题
+   * @param params type =1 已解决 type = 2 已忽略
+   * @returns {Promise | Promise<unknown>}
+   */
+  changeWarn(params) {
+    return fetch(
+      '/blade-project-manage-v2/project-dispatch/v2/handle-warning',
+      params
     )
   }
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 2
src/assets/svg/logo-white.svg


+ 2 - 0
src/layout/left.vue

@@ -80,6 +80,8 @@ export default {
         this.subActive = menu.subActive
       }
       if (
+        this.data &&
+        this.data[this.active] &&
         Object.hasOwn(this.data[this.active], 'hasChildren') &&
         this.data[this.active].hasChildren === true
       ) {

+ 4 - 4
src/page/login.vue

@@ -4,7 +4,7 @@
       <div class="flex flex-center flex-child-average">
         <div class="flex left">
           <img
-            src="https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/373e3ccd35be4ba2a72376050027612e.png"
+            src="https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/3938373d1b0c44c899f94cba263ff4a8.jpg"
             style="
               height: 560px;
               object-fit: contain;
@@ -41,7 +41,7 @@
               class="flex flex-center flex-col"
               style="height: 500px; margin-top: -20px"
             >
-              <span class="font-24 black bold">欢迎来到梧桐树云平台👏</span>
+              <span class="font-24 black bold">欢迎来到梧桐树云服务👏</span>
               <div
                 class="flex flex-col flex-center"
                 style="height: 360px; width: 360px; margin-top: -20px"
@@ -58,11 +58,11 @@
               <span
                 class="mt-10 bold main-color font-16"
                 style="margin-top: -20px"
-                >打开微信扫描二维码登陆梧桐树云平台</span
+                >打开微信扫描二维码登录梧桐树云服务</span
               >
             </div>
             <div v-else class="flex flex-col flex-center" style="height: 500px">
-              <span class="font-24 black bold">欢迎来到梧桐树云平台👏</span>
+              <span class="font-24 black bold">欢迎来到梧桐树云服务👏</span>
               <div
                 class="flex flex-col flex-center mt-5"
                 style="width: 450px; height: 400px"

+ 1 - 0
src/router/index.js

@@ -25,6 +25,7 @@ router.beforeEach((to, from, next) => {
   if (to.path === '/') {
     const menu = { active: 0, subActive: 0 }
     localStorage.setItem('index', JSON.stringify(menu))
+    localStorage.setItem('data-type', 'project')
   }
   if (to.matched.length) {
     next()

+ 0 - 1
src/views/store/component/info.vue

@@ -100,7 +100,6 @@ export default {
       })
     },
     goDetail() {
-      console.log(this.info)
       const data = this.$router.resolve({
         path: '/home/pro_detail',
         query: {

+ 56 - 57
src/views/store/component/info2.vue

@@ -6,19 +6,19 @@
     <div class="padding-left padding-right" style="padding: 20px">
       <avue-crud
         :option="option"
-        :data="data"
+        :data="active === 1 ? data : data2"
         ref="crud"
         v-model="form"
         :before-open="beforeOpen"
-        @row-del="rowDel"
-        @row-save="rowSave"
-        @row-update="rowUpdate"
-        @on-load="onLoad"
       >
         <template #menu-left>
           <div class="flex flex-center flex-justify-start padding-left">
-            <el-button type="primary">系统问题预警</el-button>
-            <el-button>项目预审问题</el-button>
+            <el-button type="primary" :plain="active === 2" @click="active = 1"
+              >系统问题预警</el-button
+            >
+            <el-button type="primary" :plain="active === 1" @click="active = 2"
+              >项目预审问题</el-button
+            >
           </div>
         </template>
         <template #menu-right>
@@ -30,6 +30,13 @@
             >新 增
           </el-button>
         </template>
+        <template #isFixed="{ row }">
+          <div>
+            <el-tag v-if="row.isFixed === 0">未处理</el-tag>
+            <el-tag v-else-if="row.warnStatus === 1">已解决</el-tag>
+            <el-tag v-else-if="row.warnStatus === 2">已忽略</el-tag>
+          </div>
+        </template>
       </avue-crud>
     </div>
     <el-dialog v-model="show" title="新增预审问题" width="800px">
@@ -62,60 +69,23 @@ export default {
   },
   data() {
     return {
+      active: 1,
       problem: '',
       show: false,
       form: {},
-      data: [
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        },
-        {
-          issue: '备案事情与开工日期隔不只7个工作作日 🔔',
-          type: '已解决'
-        }
-      ],
+      data: [],
+      data2: [],
       option: {
         align: 'center',
         menuAlign: 'center',
         menuWidth: 180,
         height: 525,
         size: 'mini',
+        delBtn: false,
+        viewBtn: true,
         addBtn: false,
-        editBtnText: '已解决',
-        delBtnText: '已忽略',
+        editBtnText: '解决',
+        viewBtnText: '忽略',
         refreshBtn: false,
         columnBtn: false,
         labelWidth: 140,
@@ -123,17 +93,22 @@ export default {
         column: [
           {
             label: '存在问题描述',
-            prop: 'issue'
+            prop: 'content'
           },
           {
             label: '状态',
-            prop: 'type',
-            width: 100
+            prop: 'isFixed',
+            width: 100,
+            slot: true
           }
         ]
       }
     }
   },
+  created() {
+    this.pid = this.$route.query.id
+    this.onLoad()
+  },
   methods: {
     addIssue() {
       if (this.problem.length === 0) {
@@ -144,13 +119,37 @@ export default {
         .addIssue({
           projectId: this.info.projectId,
           content: this.problem,
-          type: 2
+          type: 2,
+          preId: this.pid,
+          fileId: ''
         })
         .then(res => {
           if (res.code === 200) {
-            console.log(res)
+            this.show = false
+            this.$message.success(res.msg)
+            this.onLoad()
+          } else {
+            this.$message.error(res.msg)
+          }
+        })
+    },
+    onLoad() {
+      this.$api.store.fileList({ id: this.pid }).then(res => {
+        if (res.code === 200 && res.data.files.length > 0) {
+          this.data = res.data.warnings.filter(ele => ele.type === 1)
+          this.data2 = res.data.warnings.filter(ele => ele.type === 2)
+        }
+      })
+    },
+    beforeOpen(done, type) {
+      this.$api.store
+        .changeWarn({ id: this.form.id, type: type === 'view' ? 2 : 1 })
+        .then(res => {
+          if (res.code === 200) {
+            this.$message.success(res.msg)
+            this.onLoad()
           } else {
-            console.log(res)
+            this.$message.error(res.msg)
           }
         })
     }

+ 1 - 1
src/views/store/index.vue

@@ -111,7 +111,7 @@ export default {
             prop: 'hasfiles'
           },
           {
-            label: '入库时间',
+            label: '入库预审时间',
             prop: 'createTime'
           },
           {

+ 73 - 62
src/views/user/index.vue

@@ -1,25 +1,29 @@
 <template>
-  <basic-container class='mt-10'>
-    <el-avatar class='mt-20' :size='150' :src='user.info.avatarUrl'></el-avatar>
-    <div class='bold font-30'>{{ user.info.name }}</div>
-    <div class='bold font-24 mt-10'>{{ user.info.deptName }}</div>
-    <div class='mt-20 font-18 lines-height-15'>
+  <basic-container class="mt-10">
+    <el-avatar class="mt-20" :size="150" :src="user.info.avatarUrl"></el-avatar>
+    <div class="bold font-30">{{ user.info.name }}</div>
+    <div class="bold font-24 mt-10">{{ user.info.deptName }}</div>
+    <div class="mt-20 font-18 lines-height-15">
       <div>绑定电话:{{ user.info.phone }}</div>
       <div>注册时间:{{ user.info.createTime }}</div>
     </div>
-    <div class='mt-20 flex flex-center '>
-      <div class='mr-20'>
-        <img class='icon'
-             src='https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/db94c8a6a7ec46f7a3b32b20a5da3844.jpg'/>
-        <div class='font-18 bold'>梧桐研究院</div>
+    <div class="mt-20 flex flex-center">
+      <div class="mr-20">
+        <img
+          class="icon"
+          src="https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/db94c8a6a7ec46f7a3b32b20a5da3844.jpg"
+        />
+        <div class="font-18 bold">梧桐研究院</div>
       </div>
-      <div class='ml-20'>
-        <img class='icon'
-             src='https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/23fcdf89312f4c969eeb636d1adf9adc.jpg'/>
-        <div class='font-18 bold'>梧桐树云平台</div>
+      <div class="ml-20">
+        <img
+          class="icon"
+          src="https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/23fcdf89312f4c969eeb636d1adf9adc.jpg"
+        />
+        <div class="font-18 bold">梧桐树云服务</div>
       </div>
     </div>
-    <div class='mt-20 grey-6'>微信扫一扫 随时掌握项目动态</div>
+    <div class="mt-20 grey-6">微信扫一扫 随时掌握项目动态</div>
   </basic-container>
 </template>
 
@@ -31,18 +35,17 @@
 </route>
 
 <script>
-
 import BasicContainer from '@/components/basic-container/main.vue'
 import { useStore } from '@/store/user.js'
 
 export default {
   name: 'index',
   components: { BasicContainer },
-  setup () {
+  setup() {
     const user = useStore()
     return { user }
   },
-  data () {
+  data() {
     return {
       list: [],
       form: {},
@@ -71,84 +74,92 @@ export default {
     }
   },
   methods: {
-    init () {
+    init() {
       this.data = this.$route.query
-      this.$api.login.sendSMS({ current: 1, size: 200 }).then((res) => {
+      this.$api.login.sendSMS({ current: 1, size: 200 }).then(res => {
         if (res.code === 200) {
           this.list = res.data.records
         }
       })
     },
-    push () {
+    push() {
       this.$router.push({ path: '/user', query: { id: 12, type: 'test' } })
     },
-    onLoad () {
-      this.$api.login.sendSMS({ current: 1, size: 10 }).then((res) => {
+    onLoad() {
+      this.$api.login.sendSMS({ current: 1, size: 10 }).then(res => {
         if (res.code === 200) {
           this.list = res.data.records
         }
       })
     },
-    beforeOpen (done, type) {
+    beforeOpen(done, type) {
       if (['view', 'edit'].includes(type)) {
         this.getDetail()
       }
       done()
     },
-    refreshChange () {
+    refreshChange() {
       this.onLoad()
     },
-    rowSave (row, done, loading) {
+    rowSave(row, done, loading) {
       const data = {
         projectInfoId: this.info.id
       }
-      this.$api.projects.meeting.save(Object.assign(row, data)).then((res) => {
-        if (res.code === 200) {
-          this.$message.success(res.msg)
-        } else {
-          this.$message.error(res.msg)
+      this.$api.projects.meeting.save(Object.assign(row, data)).then(
+        res => {
+          if (res.code === 200) {
+            this.$message.success(res.msg)
+          } else {
+            this.$message.error(res.msg)
+          }
+          done(row)
+          this.onLoad()
+        },
+        error => {
+          window.console.log(error)
+          loading()
         }
-        done(row)
-        this.onLoad()
-      }, error => {
-        window.console.log(error)
-        loading()
-      })
+      )
     },
-    rowUpdate (row, index, done, loading) {
+    rowUpdate(row, index, done, loading) {
       const data = {
         projectInfoId: this.info.id
       }
-      this.$api.projects.meeting.update(Object.assign(row, data)).then((res) => {
-        if (res.code === 200) {
-          this.$message.success(res.msg)
-        } else {
-          this.$message.error(res.msg)
+      this.$api.projects.meeting.update(Object.assign(row, data)).then(
+        res => {
+          if (res.code === 200) {
+            this.$message.success(res.msg)
+          } else {
+            this.$message.error(res.msg)
+          }
+          done(row)
+          this.onLoad()
+        },
+        error => {
+          window.console.log(error)
+          loading()
         }
-        done(row)
-        this.onLoad()
-      }, error => {
-        window.console.log(error)
-        loading()
-      })
+      )
     },
-    rowDel (row, index, done) {
+    rowDel(row, index, done) {
       this.$confirm('确定将选择数据删除?', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(() => {
-        return this.$api.projects.meeting.removeList({ ids: row.id })
-      }).then(() => {
-        this.$message({
-          type: 'success',
-          message: '操作成功!'
-        })
-        // 数据回调进行刷新
-        done(row)
-        this.onLoad()
-      }).catch(() => {
       })
+        .then(() => {
+          return this.$api.projects.meeting.removeList({ ids: row.id })
+        })
+        .then(() => {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          // 数据回调进行刷新
+          done(row)
+          this.onLoad()
+        })
+        .catch(() => {})
     }
   }
 }
@@ -157,6 +168,6 @@ export default {
 <style scoped>
 .icon {
   width: 180px;
-  height: 180px
+  height: 180px;
 }
 </style>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است