scorpioyq %!s(int64=3) %!d(string=hai) anos
pai
achega
0326fe034f
Modificáronse 3 ficheiros con 131 adicións e 126 borrados
  1. 75 73
      src/page/login.vue
  2. 38 35
      src/views/home/component/dash.vue
  3. 18 18
      src/views/home/component/files_list.vue

+ 75 - 73
src/page/login.vue

@@ -9,88 +9,90 @@
 
 
         </div>
         </div>
 
 
-        <div class='right white-bg flex flex-col flex-child-average'>
-
-          <div class='flex flex-justify-end full-height'
-               style="margin-top: -20px;margin-right: 4px">
-            <div>
-              <img v-if="qrCodeLogin" src='../assets/img/com.png' style='width: 80px'
-                   @click='qrCodeLogin = !qrCodeLogin'/>
-              <img v-else src='../assets/img/code.png' style='width: 80px'
-                   @click='qrCodeLogin = !qrCodeLogin'/>
+        <div class='right  flex flex-col flex-child-average'>
+          <div class="flex flex-col flex-justify-between" style="height: 560px">
+            <div class='flex flex-justify-end'
+                 style="margin-right: 3px;margin-top: 3px">
+              <div>
+                <img v-if="qrCodeLogin" src='../assets/img/com.png' style='width: 80px'
+                     @click='qrCodeLogin = !qrCodeLogin'/>
+                <img v-else src='../assets/img/code.png' style='width: 80px'
+                     @click='qrCodeLogin = !qrCodeLogin'/>
+              </div>
             </div>
             </div>
-          </div>
 
 
-          <div v-if='qrCodeLogin' class='flex flex-center flex-col mt-20'>
-            <span class='font-24 black bold '>欢迎来到梧桐树云平台👏</span>
-            <div class='flex flex-col flex-center mt-10' style='height: 360px;width: 360px'>
-              <vue-qr :currentLevel='3' :logoCornerRadius='4' :logoScale='0.25' :logoSrc='logoSrc' :text='qrCodeText'
-                      size='340'/>
+            <div v-if='qrCodeLogin' class='flex flex-center flex-col ' style="height: 500px">
+              <span class='font-24 black bold '>欢迎来到梧桐树云平台👏</span>
+              <div class='flex flex-col flex-center' style='height: 360px;width: 360px;margin-top: -20px'>
+                <vue-qr :currentLevel='3' :logoCornerRadius='4' :logoScale='0.25' :logoSrc='logoSrc' :text='qrCodeText'
+                        size='260'/>
+              </div>
+              <span class='mt-10 bold main-color font-16' style="margin-top: -20px">打开微信扫描二维码登陆梧桐树云平台</span>
             </div>
             </div>
-            <span class='mt-10 bold main-color font-16'>打开微信扫描二维码登陆梧桐树云平台</span>
-          </div>
 
 
-          <div v-else class='padding-20 flex flex-col flex-center mt-20'>
-            <span class='font-24 black bold '>欢迎来到梧桐树云平台👏</span>
-            <div class="flex flex-col flex-center" style="width: 450px;height: 360px">
-              <el-form ref='loginForm' :model="form" :rules="rules">
-                <el-form-item prop='name'>
-                  <el-input
-                      v-model='form.name'
-                      placeholder="手机号码"
-                      prefix-icon="Avatar"
-                      size='large'
-                  />
-                </el-form-item>
-                <el-form-item prop='pass'>
-                  <el-input
-                      v-model='form.pass'
-                      :type='flag ? "text" : "password"'
-                      placeholder="密码"
-                      prefix-icon="WalletFilled"
-                      size='large'>
-                    <template v-slot:suffix>
-                      <div class='pointer' @click='flag=!flag'>
-                        <el-icon v-if='!flag'>
-                          <Hide/>
-                        </el-icon>
-                        <el-icon v-else>
-                          <View/>
-                        </el-icon>
-                      </div>
-                    </template>
-                  </el-input>
-                </el-form-item>
-                <el-form-item prop='code'>
-                  <el-input
-                      v-model='form.code'
-                      class='append'
-                      placeholder="验证码"
-                      prefix-icon="Refresh"
-                      size='large'
-                  >
-                    <template v-slot:append>
-                      <img :src='code' class='pic'
-                           style='height: 40px;background-color: red;background-blend-mode: lighten;'/>
-                    </template>
-                  </el-input>
-                </el-form-item>
-                <el-form-item>
-                  <div class='flex flex-align-center flex-justify-between full-width'>
-                    <div></div>
-                    <el-link :underline='false' class='font-12' type='primary'>忘记密码?</el-link>
+            <div v-else class=' flex flex-col flex-center'>
+              <span class='font-24 black bold'>欢迎来到梧桐树云平台👏</span>
+              <div class="flex flex-col flex-center mt-5" style="width: 450px;height: 400px">
+                <el-form ref='loginForm' :model="form" :rules="rules">
+                  <el-form-item prop='name'>
+                    <el-input
+                        v-model='form.name'
+                        placeholder="手机号码"
+                        prefix-icon="Avatar"
+                        size='large'
+                    />
+                  </el-form-item>
+                  <el-form-item prop='pass'>
+                    <el-input
+                        v-model='form.pass'
+                        :type='flag ? "text" : "password"'
+                        placeholder="密码"
+                        prefix-icon="WalletFilled"
+                        size='large'>
+                      <template v-slot:suffix>
+                        <div class='pointer' @click='flag=!flag'>
+                          <el-icon v-if='!flag'>
+                            <Hide/>
+                          </el-icon>
+                          <el-icon v-else>
+                            <View/>
+                          </el-icon>
+                        </div>
+                      </template>
+                    </el-input>
+                  </el-form-item>
+                  <el-form-item prop='code'>
+                    <el-input
+                        v-model='form.code'
+                        class='append'
+                        placeholder="验证码"
+                        prefix-icon="Refresh"
+                        size='large'
+                    >
+                      <template v-slot:append>
+                        <img :src='code' class='pic'
+                             style='height: 40px;background-color: red;background-blend-mode: lighten;'/>
+                      </template>
+                    </el-input>
+                  </el-form-item>
+                  <el-form-item>
+                    <div class='flex flex-align-center flex-justify-between full-width'>
+                      <div></div>
+                      <el-link :underline='false' class='font-12' type='primary'>忘记密码?</el-link>
+                    </div>
+                  </el-form-item>
+                </el-form>
+                <el-button size='large' style="width: 78%" type='primary' @click='submint'>登录</el-button>
+                <div class='flex flex-col mt-10'>
+                  <span class='grey-6'>由梧桐经济院提供技术支持</span>
+                  <div>
+                    <el-button class='mt-10' plain size='small' type='primary' @click='loginAdmin'>admin</el-button>
                   </div>
                   </div>
-                </el-form-item>
-              </el-form>
-              <el-button size='large' style="width: 78%" type='primary' @click='submint'>登录</el-button>
-              <div class='flex flex-col mt-10'>
-                <span class='grey-6'>由梧桐经济院提供技术支持</span>
-                <div>
-                  <el-button class='mt-10' plain size='small' type='primary' @click='loginAdmin'>admin</el-button>
                 </div>
                 </div>
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>
+
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>

+ 38 - 35
src/views/home/component/dash.vue

@@ -5,11 +5,12 @@
         <el-icon class="ml-20" color="#ECAB56">
         <el-icon class="ml-20" color="#ECAB56">
           <WarningFilled/>
           <WarningFilled/>
         </el-icon>
         </el-icon>
-        <span class="ml-5">项目总投资额87847万元</span>
+        <span class="ml-5">项目总投资额{{ num }}万元</span>
       </div>
       </div>
-      <div class="flex ml-20">
+      <div class="flex ml-20 hide-scrollbar" style="overflow-x: scroll;width: 86vw">
         <div v-for="(item,index) in stage" :key='item.id' :class="active === index ? 'total-s' : 'total'"
         <div v-for="(item,index) in stage" :key='item.id' :class="active === index ? 'total-s' : 'total'"
-             class="flex flex-col flex-align-start flex-center mt-20 bold font-16" @click="switchTab(item,index)">
+             class="flex flex-col flex-align-start flex-center mt-20 bold font-16 pointer"
+             @click="switchTab(item,index)">
           <span class="ml-15 sp">{{ item.name }}</span>
           <span class="ml-15 sp">{{ item.name }}</span>
           <span class="ml-15 sp1 mt-5">{{ item.projectNumber }}<span class="grey font-14 ml-5">个</span></span>
           <span class="ml-15 sp1 mt-5">{{ item.projectNumber }}<span class="grey font-14 ml-5">个</span></span>
         </div>
         </div>
@@ -18,12 +19,12 @@
     </div>
     </div>
     <avue-crud ref="crud"
     <avue-crud ref="crud"
                v-model="form"
                v-model="form"
+               v-model:page="page"
                :before-open="beforeOpen"
                :before-open="beforeOpen"
                :data="data"
                :data="data"
                :option="option"
                :option="option"
-               v-model:page="page"
-               :table-loading="loading"
                :permission="permissionList"
                :permission="permissionList"
+               :table-loading="loading"
                class="curd"
                class="curd"
                @row-del="rowDel"
                @row-del="rowDel"
                @current-change="currentChange"
                @current-change="currentChange"
@@ -102,16 +103,16 @@
 <script>
 <script>
 import BaseButton from '../../../components/base-button.vue'
 import BaseButton from '../../../components/base-button.vue'
 import permissionStore from '@/store/permission.js'
 import permissionStore from '@/store/permission.js'
-import { vaildData } from '@/utils/tools.js'
+import {vaildData} from '@/utils/tools.js'
 
 
 export default {
 export default {
   name: 'dash',
   name: 'dash',
-  components: { BaseButton },
-  setup () {
+  components: {BaseButton},
+  setup() {
     const permissions = permissionStore()
     const permissions = permissionStore()
-    return { permissions }
+    return {permissions}
   },
   },
-  data () {
+  data() {
     return {
     return {
       showAdd: false,
       showAdd: false,
       active: 0,
       active: 0,
@@ -179,6 +180,7 @@ export default {
       },
       },
       stage: [],
       stage: [],
       typeList: [],
       typeList: [],
+      num: '',
       projectForm: {
       projectForm: {
         name: '',
         name: '',
         totalAmount: '',
         totalAmount: '',
@@ -188,7 +190,7 @@ export default {
       }
       }
     }
     }
   },
   },
-  created () {
+  created() {
     this.getStageList()
     this.getStageList()
     this.getTypeList()
     this.getTypeList()
     this.$bus.on('serach', (res) => {
     this.$bus.on('serach', (res) => {
@@ -196,16 +198,16 @@ export default {
     })
     })
   },
   },
   computed: {
   computed: {
-    permissionList () {
+    permissionList() {
       return {
       return {
         delBtn: vaildData(this.permissions.permissions.home_del, false)
         delBtn: vaildData(this.permissions.permissions.home_del, false)
       }
       }
     }
     }
   },
   },
   methods: {
   methods: {
-    switchTab (item, index) {
+    switchTab(item, index) {
       this.active = index
       this.active = index
-      this.onLoad({ stageId: item.id })
+      this.onLoad({stageId: item.id === -1 ? '' : item.id})
     },
     },
     // track(id) {
     // track(id) {
     //   this.$router.push({
     //   this.$router.push({
@@ -213,68 +215,69 @@ export default {
     //     query: {id: id, type: '1'}
     //     query: {id: id, type: '1'}
     //   })
     //   })
     // },
     // },
-    onLoad (query = {}) {
-      const data = { ...query, ...this.page }
+    onLoad(query = {}) {
+      const data = {...query, ...this.page}
       this.$api.project.projectList(data).then(res => {
       this.$api.project.projectList(data).then(res => {
         if (res.code === 200) {
         if (res.code === 200) {
           this.data = res.data.content
           this.data = res.data.content
+          this.num = res.msg
           this.page.total = res.data.numberOfElements
           this.page.total = res.data.numberOfElements
           this.loading = false
           this.loading = false
         }
         }
       })
       })
     },
     },
-    beforeOpen (done, type) {
+    beforeOpen(done, type) {
       if (['view'].includes(type)) {
       if (['view'].includes(type)) {
         this.$router.push({
         this.$router.push({
           path: '/home/details',
           path: '/home/details',
-          query: { id: this.form.id, type: '0' }
+          query: {id: this.form.id, type: '0'}
         })
         })
       } else if (type === 'edit') {
       } else if (type === 'edit') {
         this.$router.push({
         this.$router.push({
           path: '/home/details',
           path: '/home/details',
-          query: { id: this.form.id, type: '1' }
+          query: {id: this.form.id, type: '1'}
         })
         })
       }
       }
     },
     },
-    currentChange (currentPage) {
+    currentChange(currentPage) {
       this.page.currentPage = currentPage
       this.page.currentPage = currentPage
     },
     },
-    sizeChange (pageSize) {
+    sizeChange(pageSize) {
       this.page.pageSize = pageSize
       this.page.pageSize = pageSize
     },
     },
-    refreshChange () {
+    refreshChange() {
       this.onLoad(this.page, this.query)
       this.onLoad(this.page, this.query)
     },
     },
-    rowDel (row) {
+    rowDel(row) {
       this.$confirm('确定删除选择的项目?', {
       this.$confirm('确定删除选择的项目?', {
         confirmButtonText: '确定',
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         type: 'warning'
         type: 'warning'
       })
       })
-        .then(() => {
-          this.$api.project.projectRemove({ ids: row.id }).then(res => {
-            if (res.code === 200) {
-              this.$message.success(res.msg)
-              this.onLoad()
-            } else {
-              this.$message.error(res.msg)
-            }
+          .then(() => {
+            this.$api.project.projectRemove({ids: row.id}).then(res => {
+              if (res.code === 200) {
+                this.$message.success(res.msg)
+                this.onLoad()
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
           })
           })
-        })
     },
     },
-    getStageList () {
+    getStageList() {
       this.$api.project.userStageList().then(res => {
       this.$api.project.userStageList().then(res => {
         if (res.code === 200) {
         if (res.code === 200) {
           this.stage = res.data
           this.stage = res.data
         }
         }
       })
       })
     },
     },
-    getTypeList () {
+    getTypeList() {
       this.$api.project.typeList().then(res => {
       this.$api.project.typeList().then(res => {
         this.typeList = res.data.records
         this.typeList = res.data.records
       })
       })
     },
     },
-    projectSave () {
+    projectSave() {
       this.$api.project.projectAdd(this.projectForm).then(res => {
       this.$api.project.projectAdd(this.projectForm).then(res => {
         if (res.code === 200) {
         if (res.code === 200) {
           this.showAdd = false
           this.showAdd = false

+ 18 - 18
src/views/home/component/files_list.vue

@@ -2,7 +2,7 @@
   <div class="full-width full-height mb-10">
   <div class="full-width full-height mb-10">
     <div class="flex flex-col">
     <div class="flex flex-col">
       <div class="flex flex-align-center padding border-bottom bold title-sp">
       <div class="flex flex-align-center padding border-bottom bold title-sp">
-        <span class="flex-1">111</span>
+        <span class="flex-1"></span>
         <span style="flex: 2">文件/文件夹名称</span>
         <span style="flex: 2">文件/文件夹名称</span>
         <span style="flex: 1">更新(上传)时间</span>
         <span style="flex: 1">更新(上传)时间</span>
         <span class="flex-1">文件大小</span>
         <span class="flex-1">文件大小</span>
@@ -11,7 +11,7 @@
         <span style="flex: 3">操作</span>
         <span style="flex: 3">操作</span>
       </div>
       </div>
       <el-empty v-if="files && files.length === 0"/>
       <el-empty v-if="files && files.length === 0"/>
-      <div v-for="item in files" :key='item.id' v-else class="flex flex-center border-bottom padding content-sp">
+      <div v-for="item in files" v-else :key='item.id' class="flex flex-center border-bottom padding content-sp">
         <div class="flex-1">
         <div class="flex-1">
           <img v-if="item.suffix === 'docx'" class="icon" src="../../../assets/svg/folder/doc.svg">
           <img v-if="item.suffix === 'docx'" class="icon" src="../../../assets/svg/folder/doc.svg">
           <img v-else-if="item.suffix === 'pdf'" class="icon" src="../../../assets/svg/folder/pdf.svg">
           <img v-else-if="item.suffix === 'pdf'" class="icon" src="../../../assets/svg/folder/pdf.svg">
@@ -40,17 +40,17 @@
 
 
 <script>
 <script>
 import mainButton from '../../../components/main-button.vue'
 import mainButton from '../../../components/main-button.vue'
-import { bytesToSize } from '../../../utils/tools.js'
+import {bytesToSize} from '../../../utils/tools.js'
 
 
 export default {
 export default {
   name: 'files_list',
   name: 'files_list',
-  components: { mainButton },
+  components: {mainButton},
   props: {
   props: {
     data: Object
     data: Object
   },
   },
   watch: {
   watch: {
     data: {
     data: {
-      handler (val) {
+      handler(val) {
         if (val === '' || val === null) {
         if (val === '' || val === null) {
           return
           return
         }
         }
@@ -67,34 +67,34 @@ export default {
       immediate: true
       immediate: true
     }
     }
   },
   },
-  data () {
+  data() {
     return {
     return {
       files: []
       files: []
     }
     }
   },
   },
   methods: {
   methods: {
-    View (item) {
+    View(item) {
       this.$router.push('/home/file_detail?id=' + item.fileId)
       this.$router.push('/home/file_detail?id=' + item.fileId)
     },
     },
-    downFile (item) {
+    downFile(item) {
       window.open('/api/wutong-file/minio/file/downFile/' + item.dowloadFileId, '')
       window.open('/api/wutong-file/minio/file/downFile/' + item.dowloadFileId, '')
     },
     },
-    removeFile (item) {
+    removeFile(item) {
       this.$confirm('确认是否删除该文件?', {
       this.$confirm('确认是否删除该文件?', {
         confirmButtonText: '确定',
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         type: 'warning'
         type: 'warning'
       })
       })
-        .then(() => {
-          this.$api.project.fileRemove({ ids: item.id }).then(res => {
-            if (res.code === 200) {
-              this.$bus.emit('delete')
-              this.$message.success(res.msg)
-            } else {
-              this.$message.error(res.msg)
-            }
+          .then(() => {
+            this.$api.project.fileRemove({ids: item.id}).then(res => {
+              if (res.code === 200) {
+                this.$bus.emit('delete')
+                this.$message.success(res.msg)
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
           })
           })
-        })
     }
     }
 
 
   }
   }