Browse Source

2023-12-12 添加下载模板

W 1 year ago
parent
commit
644f5b10d4

BIN
dist.zip


+ 5 - 47
src/api/index.js

@@ -1,49 +1,7 @@
+/*
+ * @Author: 阿小凉
+ * @Date: 2023-11-25 09:01:46
+ * @LastEditTime: 2023-12-11 17:51:50
+ */
 import request from '@/utils/request'
-// 获取所有商品尺码销量,销售额
-export const skuDaySale = params => request({ url: '/goods/get_goods_sku_sales_value', method: 'get', params })
-
-
-// 获取每日销售额
-export const dailySale = params => request({ url: '/order/get_order_daily_sales', method: 'get', params })
-
-// 获取店铺前十
-export const topTen = params => request({ url: '/order/get_store_top10', method: 'get', params })
-
-// 获取首页展示数据
-export const getData = params => request({ url: '/index/index', method: 'get', params })
-
-
-
-// 获取各省各种款式销售信息
-export const getProvinceAttr = params => request({ url: '/index/get_province_sales_attr', method: 'get', params })
-
-// 获取销售曲线
-export const getSaleInfo = params => request({ url: '/index/get_sale_info', method: 'get', params })
-
-// 获取销售总数据
-export const allOrderBy = params => request({ url: '/index/all_order_by', method: 'get', params })
-
-// 获取销售总数据
-export const yesterdayOrderBy = params => request({ url: '/index/yesterday_order_by', method: 'get', params })
-
-// 获取总销售额,退货额,取消额
-export const getHistoryTotal = params => request({ url: '/index/get_history_total', method: 'get', params })
-
-// 获取总销售额,退货额,取消额
-export const getSkuHistoryNum = params => request({ url: '/index/get_sku_history_num', method: 'get', params })
-
-// 获取总销售额,退货额,取消额
-export const skuOrderBy = params => request({ url: '/index/get_sku_order_by', method: 'get', params })
-
-// 每日新增注册人数
-export const addAgent = params => request({ url: '/index/get_every_add_agent', method: 'get', params })
-
-// 客服每日新增注册人数排行
-export const addSort = params => request({ url: '/index/get_every_add_agent_sort', method: 'get', params })
-
-// 每日客服新增公司客户变化曲线
-export const addSortLine = params => request({ url: '/index/get_every_add_agent_line', method: 'get', params })
-
-// 获取支付比例
-export const payRate = params => request({ url: '/index/get_agent_pay_rate', method: 'get', params })
 

+ 7 - 1
src/api/module.js

@@ -1,7 +1,7 @@
 /*
  * @Author: 阿小凉
  * @Date: 2023-11-29 09:39:46
- * @LastEditTime: 2023-11-30 12:12:10
+ * @LastEditTime: 2023-12-11 15:52:35
  */
 // 招商企业
 import request from '@/utils/request'
@@ -37,6 +37,12 @@ export const researchModule = params => request({
   method: 'get',
   params
 })
+// 产业园区
+export const introductionModule = params => request({
+  url: '/module/introduction',
+  method: 'get',
+  params
+})
 // 所有模块
 export const moduleBlock = params => request({
   url: '/module/block',

+ 0 - 1
src/icons/svg/goods.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1609835440983" class="icon" viewBox="0 0 1820 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5105" xmlns:xlink="http://www.w3.org/1999/xlink" width="355.46875" height="200"><defs><style type="text/css"></style></defs><path d="M521.443556 511.772444c0 214.480593 173.871407 388.361481 388.361481 388.361482 214.480593 0 388.361481-173.871407 388.361482-388.361482 0-214.490074-173.871407-388.361481-388.361482-388.361481-214.490074 0-388.361481 173.871407-388.361481 388.361481z m0 0" fill="#00DEBF" p-id="5106"></path><path d="M1092.901926 387.176296c-10.657185-12.183704-25.874963-28.928-39.575704-45.672296-16.744296-13.700741-31.971556-28.928-45.672296-39.575704-19.787852-15.217778-30.445037-18.261333-39.575704-18.261333h-222.245926c-18.270815 0-35.015111 16.744296-35.015111 35.015111V703.81037c0 19.787852 16.744296 36.532148 35.015111 36.532149h328.808297c19.787852 0 33.488593-16.744296 33.488592-35.00563V426.752c3.034074-6.087111 3.034074-16.744296-15.227259-39.575704z m-114.166519 184.18726h38.058667v57.846518h-36.532148v-57.846518h-1.526519z m-56.329481-73.064297h36.532148v130.910815h-36.532148V498.299259z m-57.846519 53.276445h36.532149v77.63437h-36.532149v-77.63437z m-56.32-111.122963h36.532149v188.757333h-36.532149V440.452741z m254.217482 245.086815h-302.933333V649.007407h302.933333v36.532149z m-65.460148-284.662519v-71.547259c12.174222 9.130667 22.831407 19.787852 36.532148 35.005629 13.700741 15.217778 22.831407 25.874963 31.971555 36.532149h-68.503703z m0 0" fill="#FFFFFF" p-id="5107"></path></svg>

+ 27 - 30
src/router/auth.js

@@ -95,8 +95,8 @@ export const asyncRoutes = [
     redirect: 'noRedirect',
     name: 'Company',
     meta: {
-      title: '入驻企业',
-      icon: 'form'
+      title: '企业管理',
+      icon: 'star'
     },
     children: [{
         path: 'company',
@@ -158,16 +158,16 @@ export const asyncRoutes = [
           icon: 'lock'
         }
       },
-      {
-        path: 'product',
-        name: 'CompanyProduct',
-        component: '/company/product',
-        meta: {
-          title: '企业产品',
-          noCache: true,
-          icon: 'list'
-        }
-      }
+      // {
+      //   path: 'product',
+      //   name: 'CompanyProduct',
+      //   component: '/company/product',
+      //   meta: {
+      //     title: '企业产品',
+      //     noCache: true,
+      //     icon: 'list'
+      //   }
+      // }
     ]
   },
   {
@@ -177,7 +177,7 @@ export const asyncRoutes = [
     name: 'InvestCompany',
     meta: {
       title: '招商管理',
-      icon: 'form'
+      icon: 'skill'
     },
     children: [{
         path: 'activity',
@@ -186,7 +186,7 @@ export const asyncRoutes = [
         meta: {
           title: '招商活动',
           noCache: true,
-          icon: 'stock'
+          icon: 'table'
         }
       },
       {
@@ -214,19 +214,6 @@ export const asyncRoutes = [
       }
     }]
   },
-  // {
-  //   path: '/module',
-  //   component: 'Layout',
-  //   children: [{
-  //     path: 'module',
-  //     name: 'Module',
-  //     component: '/module/module',
-  //     meta: {
-  //       title: '动态模块',
-  //       icon: 'link'
-  //     }
-  //   }]
-  // },
   {
     path: '/module',
     component: 'Layout',
@@ -243,7 +230,7 @@ export const asyncRoutes = [
         meta: {
           title: '人才模块',
           noCache: true,
-          icon: 'stock'
+          icon: 'tab'
         }
       },
       {
@@ -253,7 +240,7 @@ export const asyncRoutes = [
         meta: {
           title: '招商模块',
           noCache: true,
-          icon: 'stock'
+          icon: 'dashboard'
         }
       },
       {
@@ -263,7 +250,7 @@ export const asyncRoutes = [
         meta: {
           title: '研发模块',
           noCache: true,
-          icon: 'stock'
+          icon: 'inte_manage'
         }
       },
       {
@@ -273,6 +260,16 @@ export const asyncRoutes = [
         meta: {
           title: '类型模块',
           noCache: true,
+          icon: 'lock'
+        }
+      },
+      {
+        path: 'park',
+        name: 'ParkModule',
+        component: '/module/park',
+        meta: {
+          title: '园区简介',
+          noCache: true,
           icon: 'stock'
         }
       }

+ 23 - 13
src/router/index.js

@@ -100,8 +100,8 @@ export const asyncRoutes = [
     redirect: 'noRedirect',
     name: 'CompanyList',
     meta: {
-      title: '入驻企业',
-      icon: 'form'
+      title: '企业管理',
+      icon: 'star'
     },
     children: [{
         path: 'list',
@@ -163,16 +163,16 @@ export const asyncRoutes = [
           icon: 'output'
         }
       },
-      {
-        path: 'product',
-        name: 'CompanyProduct',
-        component: () => import('@/views/company/product'),
-        meta: {
-          title: '企业产品',
-          noCache: true,
-          icon: 'account'
-        }
-      }
+      // {
+      //   path: 'product',
+      //   name: 'CompanyProduct',
+      //   component: () => import('@/views/company/product'),
+      //   meta: {
+      //     title: '企业产品',
+      //     noCache: true,
+      //     icon: 'account'
+      //   }
+      // }
     ]
   },
   {
@@ -182,7 +182,7 @@ export const asyncRoutes = [
     name: 'InvestCompany',
     meta: {
       title: '招商管理',
-      icon: 'form'
+      icon: 'skill'
     },
     children: [{
         path: 'activity',
@@ -307,6 +307,16 @@ export const asyncRoutes = [
           noCache: true,
           icon: 'stock'
         }
+      },
+      {
+        path: 'park',
+        name: 'ParkModule',
+        component: '/module/park',
+        meta: {
+          title: '园区简介',
+          noCache: true,
+          icon: 'stock'
+        }
       }
     ]
   },

+ 7 - 1
src/views/company/list.vue

@@ -8,9 +8,11 @@
           <el-option v-for="item in item.children" :key="item.id" :label="item.name" :value="item.id" />
         </el-select>
       </div>
+
       <el-input v-model="params.search_name" clearable placeholder="企业名称" prefix-icon="el-icon-search"
         @keyup.enter.native="toSearch()" @clear="toSearch()" />
       <el-button type="primary" icon="el-icon-search" :loading="loadingFull" @click="toSearch()">搜索</el-button>
+      <el-button type="primary" class="filter-item" @click="downloadFile">下载模板</el-button>
       <el-upload class="upload-demo" action="" :http-request="uploadFile" :multiple="false" :show-file-list="false">
         <el-button type="primary" style="margin:0 10px;">导入</el-button>
       </el-upload>
@@ -80,7 +82,7 @@
 
 <script>
 import { companyList, deleteCompany, importCompany, companyCategory } from '@/api/company'
-
+import axios from 'axios'
 export default {
   name: 'CompanyList',
   data() {
@@ -110,6 +112,10 @@ export default {
     this.getCategory()
   },
   methods: {
+    // 下载模板
+    downloadFile() {
+      window.open(`http://api.xysyszhd.dev.xmnk.cn/import/企业数据.xlsx`)
+    },
     // 获取列表
     async getCategory() {
       try {

+ 5 - 0
src/views/company/output.vue

@@ -11,6 +11,7 @@
                 placeholder="选择日期时间" style="width:300px" @change="toSearch()">
             </el-date-picker>
             <el-button @click="handleEdit(false)" type="primary" style="margin-right:10px;">添加</el-button>
+            <el-button @click="downloadFile" type="primary" style="margin-right:10px;">下载模板</el-button>
             <el-upload class="upload-demo" action="" :http-request="uploadFile" :multiple="false" :show-file-list="false">
                 <el-button type="primary">导入</el-button>
             </el-upload>
@@ -130,6 +131,10 @@ export default {
         this.getCompany()
     },
     methods: {
+         // 下载模板
+         downloadFile() {
+            window.open(`http://api.xysyszhd.dev.xmnk.cn/import/产投数据.xlsx`)
+        },
         // 获取企业列表
         async getCompany() {
             try {

+ 7 - 2
src/views/company/patent.vue

@@ -16,7 +16,9 @@
             <el-input v-model="params.search_name" clearable placeholder="名称" prefix-icon="el-icon-search"
                 @keyup.enter.native="toSearch()" @clear="toSearch()" />
             <el-button type="primary" icon="el-icon-search" :loading="loadingFull" @click="toSearch()">搜索</el-button>
-            <el-button @click="handleEdit(0)" type="primary" style="margin-right:24px;">添加</el-button>
+            <el-button @click="handleEdit(0)" type="primary" >添加</el-button>
+            <el-button @click="downloadFile" type="primary" style="margin-right:10px;">下载模板</el-button>
+
             <el-upload class="upload-demo" action="" :http-request="uploadFile" :multiple="false" :show-file-list="false">
                 <el-button type="primary">导入</el-button>
             </el-upload>
@@ -186,7 +188,10 @@ export default {
         }
     },
     methods: {
-
+        // 下载模板
+        downloadFile() {
+            window.open(`http://api.xysyszhd.dev.xmnk.cn/import/知识产权.xlsx`)
+        },
         selectOne(params) {
             const data = this.typeList.children.find((item) => {
                 return item.id === params

+ 5 - 0
src/views/company/product.vue

@@ -12,6 +12,7 @@
             <el-button type="primary" icon="el-icon-search" :loading="loadingFull" @click="toSearch()">搜索</el-button>
 
             <el-button @click="handleEdit(false)" type="primary" style="margin-right:10px;">添加</el-button>
+            <el-button @click="downloadFile" type="primary" style="margin-right:10px;">下载模板</el-button>
             <el-upload class="upload-demo" action="" :http-request="uploadFile" :multiple="false" :show-file-list="false">
                 <el-button type="primary">导入</el-button>
             </el-upload>
@@ -143,6 +144,10 @@ export default {
     },
     components: { Tinymce },
     methods: {
+        // 下载模板
+        downloadFile() {
+            window.open(`http://api.xysyszhd.dev.xmnk.cn/import/产品数据.xlsx`)
+        },
         // 轮播图上传
         bannerPictureUpload(params) {
             this.thumbLoad = true

+ 6 - 0
src/views/company/project.vue

@@ -18,6 +18,8 @@
             <el-button type="primary" icon="el-icon-search" :loading="loadingFull" @click="toSearch()">搜索</el-button>
 
             <el-button @click="handleEdit(false)" type="primary" style="margin-right:10px;">添加</el-button>
+            <el-button @click="downloadFile" type="primary" style="margin-right:10px;">下载模板</el-button>
+
             <el-upload class="upload-demo" action="" :http-request="uploadFile" :multiple="false" :show-file-list="false">
                 <el-button type="primary">导入</el-button>
             </el-upload>
@@ -143,6 +145,10 @@ export default {
     },
     components: { Tinymce },
     methods: {
+        // 下载模板
+        downloadFile() {
+            window.open(`http://api.xysyszhd.dev.xmnk.cn/import/项目数据.xlsx`)
+        },
         // 获取企业列表
         async getCompany() {
             try {

+ 6 - 2
src/views/company/talents.vue

@@ -12,9 +12,9 @@
       <el-input v-model="params.search_name" clearable placeholder="请输入姓名" prefix-icon="el-icon-search"
         @keyup.enter.native="toSearch()" @clear="toSearch()" />
       <el-button type="primary" icon="el-icon-search" :loading="loadingFull" @click="toSearch()">搜索</el-button>
-      <el-button @click="handleEdit(false)" type="primary" style="margin-right:24px;">添加</el-button>
+      <el-button @click="handleEdit(false)" type="primary" >添加</el-button>
       <!-- <el-button @click="handleDesc" type="primary" style="margin-right:24px;">人才概述</el-button> -->
-
+      <el-button @click="downloadFile" type="primary" style="margin-right:10px;">下载模板</el-button>
       <el-upload class="upload-demo" action="" :http-request="uploadFile" :multiple="false" :show-file-list="false">
         <el-button type="primary">导入</el-button>
       </el-upload>
@@ -220,6 +220,10 @@ export default {
     this.getCompany()
   },
   methods: {
+     // 下载模板
+     downloadFile() {
+      window.open(`http://api.xysyszhd.dev.xmnk.cn/import/人才数据.xlsx`)
+    },
     // //人才概述
     // handleDesc() {
     //   this.descDialogVisible = true

+ 6 - 1
src/views/invest/achievement.vue

@@ -15,10 +15,11 @@
                 @clear="toSearch()">
                 <el-option v-for="item in projectList" :key="item.id" :label="item.name" :value="item.id" />
             </el-select>
+            <el-button @click="handleEdit(false)" type="primary" style="margin-left:10px;">添加</el-button>
+            <el-button @click="downloadFile" type="primary" style="margin-right:10px;">下载模板</el-button>
             <el-upload class="upload-demo" action="" :http-request="uploadFile" :multiple="false" :show-file-list="false">
                 <el-button type="primary" style="margin:0 10px;">导入</el-button>
             </el-upload>
-            <el-button @click="handleEdit(false)" type="primary" style="margin-left:10px;">添加</el-button>
         </div>
         <div class="table_box">
             <el-table ref="list" :data="listData" align="center" :header-cell-style="{ background: '#f8fbfc' }"
@@ -141,6 +142,10 @@ export default {
         this.getOptions()
     },
     methods: {
+         // 下载模板
+         downloadFile() {
+            window.open(`http://api.xysyszhd.dev.xmnk.cn/import/招商成果.xlsx`)
+        },
         // 选择企业后项目联动
         changeCompany(id) {
             this.getComPoject(id)

+ 5 - 0
src/views/invest/activity.vue

@@ -7,6 +7,7 @@
                 @keyup.enter.native="toSearch()" @clear="toSearch()" style="width:320px;" />
             <el-button type="primary" icon="el-icon-search" :loading="loadingFull" @click="toSearch()">搜索</el-button>
             <el-button @click="handleEdit(false)" type="primary">添加</el-button>
+            <el-button @click="downloadFile" type="primary" style="margin-right:10px;">下载模板</el-button>
             <el-upload class="upload-demo" action="" :http-request="uploadFile" :multiple="false" :show-file-list="false">
                 <el-button type="primary" style="margin:0 10px;">导入</el-button>
             </el-upload>
@@ -108,6 +109,10 @@ export default {
         this.getList()
     },
     methods: {
+          // 下载模板
+          downloadFile() {
+            window.open(`http://api.xysyszhd.dev.xmnk.cn/import/招商活动.xlsx`)
+        },
         // 导入
         uploadFile(params) {
             const file = params.file

+ 65 - 0
src/views/module/park.vue

@@ -0,0 +1,65 @@
+<!-- 园区介绍 -->
+<template>
+    <div class="content">
+        <div style="font-size:18px;font-weight: bold;margin-bottom:20px;">{{ info.title }}</div>
+        <div>
+            <tinymce v-model="info.content" :height="300" width="80%" menubar="" />
+            <div style="margin:20px 0;">
+                <!-- <el-button @click="item.isEdit = !item.isEdit" type="primary">编辑</el-button> -->
+                <el-button @click="save()" type="primary">保存</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import Tinymce from '@/components/Tinymce'
+import { introductionModule, editModule } from '@/api/module'
+export default {
+    data() {
+        return {
+            info: ''
+        }
+    },
+    components: { Tinymce },
+    mounted() {
+        this.getModule()
+    },
+    methods: {
+        getModule() {
+            introductionModule().then(res => {
+                const { code, data, msg } = res
+                if (code === 200) {
+                    this.info = data
+                } else {
+                    this.$message.error(msg)
+                }
+            })
+        },
+        save() {
+            const { content, title, id } = this.info
+            if (!content) {
+                this.$message.error('内容不能为空')
+                return
+            }
+            editModule({ id, title, content }).then(res => {
+                const { code, msg } = res
+                if (code === 200) {
+                    this.$message.success('已保存')
+                } else {
+                    this.$message.error(msg)
+                }
+            })
+        },
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+.content {
+    .title {
+        font-size: 18px;
+        font-weight: bold;
+        margin-bottom: 12px;
+    }
+}
+</style>

+ 5 - 6
src/views/notice/notice.vue

@@ -38,7 +38,7 @@
                 </el-table-column>
             </el-table>
         </div>
-        <el-drawer :title="isEdit ? '修改政策公告' : '添加政策公告'" :visible.sync="dialogVisible" size="45%">
+        <el-drawer :title="isEdit ? '修改政策公告' : '添加政策公告'" :visible.sync="dialogVisible" size="50%">
             <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
                 <el-form-item label="标题:" prop="title">
                     <el-input v-model="ruleForm.title" placeholder="请输入标题" style="width:300px" />
@@ -52,8 +52,8 @@
                     </el-date-picker>
                 </el-form-item>
                 <el-form-item v-for="(item, i) in categoryList" :key="i" :label="item.name" :prop="item.mark">
-                    <el-select v-model="ruleForm[item.mark]" :placeholder="'请选择' + item.name" :ref="'template_' + i" :style="{ width: '300px' }"
-                        filterable clearableruleFormruleForm style="width:300px">
+                    <el-select v-model="ruleForm[item.mark]" :placeholder="'请选择' + item.name" :ref="'template_' + i"
+                        :style="{ width: '300px' }" filterable clearableruleFormruleForm style="width:300px">
                         <el-option v-for="(temp, idx) in item.children" :key="idx" :label="temp.name" :value="temp.id">
                             <span style="float: left" class="span-style">{{ temp.name }}</span>
                             <!-- <span style="float: right" class="span-style-delete" @click.stop="deleteItem(temp)">
@@ -266,9 +266,8 @@ export default {
         handleEdit(isEdit, row) {
             this.dialogVisible = true
             this.isEdit = isEdit
-            if (!isEdit) { // 添加
-                this.reset()
-            } else { // 编辑
+            this.reset()
+            if (isEdit) { // 添加 // 编辑
                 this.id = row.id
                 const { title, time, content, source } = row
                 this.ruleForm = {