Browse Source

新增上传文件请求类型

zhangqiOMG 2 years ago
parent
commit
2da7933ad5

+ 23 - 0
bin/vite

@@ -0,0 +1,23 @@
+#!/usr/bin/env node
+
+const path = require('path')
+const spawn = require('cross-spawn')
+const configPath = require.resolve('vue-cli-plugin-vite/config/index.ts')
+const cwd = path.resolve(__dirname, '../')
+
+const params = [
+  `${process.env.BUILD ? 'build' : ''}`,
+  process.env.VITE_DEBUG ? '--debug' : '',
+  '--config',
+  `${configPath}`,
+].filter(Boolean)
+
+console.log(`running: vite ${params.join(' ')}`)
+const serveService = spawn('vite', params, {
+  cwd,
+  stdio: 'inherit',
+})
+
+serveService.on('close', (code) => {
+  process.exit(code)
+})

File diff suppressed because it is too large
+ 873 - 605
package-lock.json


+ 1 - 0
package.json

@@ -38,6 +38,7 @@
     "eslint-plugin-import": "^2.25.3",
     "eslint-plugin-vue": "^8.0.3",
     "eslint-plugin-vuejs-accessibility": "^1.1.0",
+    "vue-cli-plugin-vite": "^1.5.0",
     "vue-template-compiler": "^2.6.14"
   },
   "eslintConfig": {

+ 1 - 1
src/HManagement/roleManage/modules/role_details.vue

@@ -32,7 +32,7 @@
       <p class="normal-title mb-16">角色授权</p>
       <el-row :gutter="20">
         <el-col :span="12">
-          <tableLayout :layout="tablecols" :data="roleMainInfo.apps" :opwidth="200" :custom="false" @rowClick="appoptionselect">
+          <tableLayout :layout="tablecols" :data="roleMainInfo.apps" height="500px" :custom="false" @rowClick="appoptionselect">
           </tableLayout>
         </el-col>
         <el-col :span="12">

+ 0 - 1
src/SManagement/archives_ad/index.vue

@@ -33,7 +33,6 @@ import detail from '@/SManagement/archives_ad/components/detail'
 import Delete from '@/SManagement/archives_ad/components/delete'
 import Edit from '@/SManagement/archives_ad/components/Edit'
 import Pagination from '@/components/pagination/Pagination'
-import { log } from '@antv/g2plot/lib/utils'
 export default {
   name: 'index',
   data() {

+ 16 - 7
src/components/layout/index.vue

@@ -5,14 +5,18 @@
         <div class="logo-avatar">
           <img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="width:100%" :src="img.url" alt="">
         </div>
-        <div class="item active" @click="$router.push('/home')">
-           <img width="30" src="../../assets/nav_icon/work_station.svg" alt="">
-           <p>工作台</p>
+        <div class="item" :class="routerName === '工作台'?'active':''" @click="$router.push('/home')">
+          <img width="30" src="../../assets/nav_icon/work_station.svg" alt="">
+          <p>工作台</p>
         </div>
-        <div class="item" @click="$router.push('/message')">
-           <img width="30" src="../../assets/nav_icon/work_station.svg" alt="">
-           <p>消息</p>
+        <div class="item" :class="routerName === '消息中心'?'active':''" @click="$router.push('/message')">
+          <img width="30" src="../../assets/nav_icon/work_station.svg" alt="">
+          <p>消息</p>
         </div>
+        <!-- <div class="item" :class="routerName === '媒体库'?'active':''" @click="$router.push('/mediaStock')">
+          <img width="30" src="../../assets/nav_icon/work_station.svg" alt="">
+          <p>媒体库</p>
+        </div> -->
       </div>
       <div class="nav-bottom-item">
         <div class="item">
@@ -67,7 +71,12 @@ export default {
         "method": "querySite",
         "content": {}
       })
-    }
+    },
+    redictToModules (item) {
+      this.$router.push({path:item.apps[0].path})
+      sessionStorage.setItem('active_modules',JSON.stringify(item))
+      window.sessionStorage.setItem('currentPath',item.apps[0].path)
+    },
   },
   created () {
     this.siteInfos()

+ 1 - 1
src/components/layout/modules/header.vue

@@ -9,7 +9,7 @@
         </div>
       </span>
       <el-dropdown-menu slot="dropdown">
-        <!-- <el-dropdown-item>个人中心</el-dropdown-item> -->
+        <el-dropdown-item @click.native="$router.replace({path:'/user_center'})">个人中心</el-dropdown-item>
         <el-dropdown-item v-if="canChangeSite" @click.native="$router.replace({path:'/accounts'})">切换账号</el-dropdown-item>
         <el-dropdown-item divided @click.native="loginOut()">退出登录</el-dropdown-item>
       </el-dropdown-menu>

+ 1 - 1
src/components/upload/hw_obs_upload.vue

@@ -103,7 +103,7 @@ export default {
     async upoladFileToServer (url, file, ext, obsfilename) {      
       let THIS = this
       let config = {
-        headers: ext === 'pdf' ? { 'Content-Type': 'application/pdf' } : { 'Content-Type': 'application/octet-stream' },
+        headers: ext === 'pdf' ? { 'Content-Type': 'application/pdf' } : ext === 'svg'?{ 'Content-Type': 'image/svg+xml' } : { 'Content-Type': 'application/octet-stream' },
         onUploadProgress: function (progressEvent) {
           let percent = progressEvent.loaded / progressEvent.total * 100
           THIS.filelist.forEach(e => {

Some files were not shown because too many files changed in this diff