W 1 year ago
parent
commit
acd6502c7b

BIN
dist.zip


+ 3 - 1
src/api/company.js

@@ -1,7 +1,7 @@
 /*
  * @Author: 阿小凉
  * @Date: 2023-11-25 09:01:46
- * @LastEditTime: 2023-11-29 18:23:46
+ * @LastEditTime: 2023-11-30 11:06:29
  */
 
 // 入驻企业
@@ -31,6 +31,8 @@ export const importCompany = data => request({ url: '/company/import', method: '
 export const talentList = params => request({ url: '/talent/list', method: 'get', params })
 // 分类模块
 export const talentCategory = params => request({ url: '/talent/category', method: 'get', params })
+// 动态模块
+export const talentModule = params => request({ url: '/talent/module', method: 'get', params })
 // 新增人才
 export const addTalent = data => request({ url: '/talent/add', method: 'post', data })
 // 修改人才

+ 31 - 1
src/api/module.js

@@ -1,7 +1,7 @@
 /*
  * @Author: 阿小凉
  * @Date: 2023-11-29 09:39:46
- * @LastEditTime: 2023-11-29 09:44:03
+ * @LastEditTime: 2023-11-30 12:12:10
  */
 // 招商企业
 import request from '@/utils/request'
@@ -13,6 +13,36 @@ export const moduleList = params => request({
   method: 'get',
   params
 })
+// 人才模块
+export const talentModule = params => request({
+  url: '/module/talent',
+  method: 'get',
+  params
+})
+// 行业数据模块
+export const industryModule = params => request({
+  url: '/module/industry',
+  method: 'get',
+  params
+})
+// 招商模块
+export const investModule = params => request({
+  url: '/module/invest',
+  method: 'get',
+  params
+})
+// 研发模块
+export const researchModule = params => request({
+  url: '/module/research',
+  method: 'get',
+  params
+})
+// 所有模块
+export const moduleBlock = params => request({
+  url: '/module/block',
+  method: 'get',
+  params
+})
 // 分类
 export const moduleCategory = params => request({
   url: '/module/category',

+ 59 - 7
src/router/auth.js

@@ -214,19 +214,71 @@ export const asyncRoutes = [
       }
     }]
   },
+  // {
+  //   path: '/module',
+  //   component: 'Layout',
+  //   children: [{
+  //     path: 'module',
+  //     name: 'Module',
+  //     component: '/module/module',
+  //     meta: {
+  //       title: '动态模块',
+  //       icon: 'link'
+  //     }
+  //   }]
+  // },
   {
     path: '/module',
     component: 'Layout',
+    redirect: 'noRedirect',
+    name: 'module',
+    meta: {
+      title: '模块管理',
+      icon: 'form'
+    },
     children: [{
-      path: 'module',
-      name: 'Module',
-      component: '/module/module',
-      meta: {
-        title: '动态模块',
-        icon: 'link'
+        path: 'talent',
+        name: 'TalentModule',
+        component: '/module/talent',
+        meta: {
+          title: '人才模块',
+          noCache: true,
+          icon: 'stock'
+        }
+      },
+      {
+        path: 'invest',
+        name: 'InvestModule',
+        component: '/module/invest',
+        meta: {
+          title: '招商模块',
+          noCache: true,
+          icon: 'stock'
+        }
+      },
+      {
+        path: 'research',
+        name: 'ResearchModule',
+        component: '/module/research',
+        meta: {
+          title: '研发模块',
+          noCache: true,
+          icon: 'stock'
+        }
+      },
+      {
+        path: 'industry',
+        name: 'IndustryModule',
+        component: '/module/industry',
+        meta: {
+          title: '类型模块',
+          noCache: true,
+          icon: 'stock'
+        }
       }
-    }]
+    ]
   },
+
   {
     path: '/notice',
     component: 'Layout',

+ 62 - 9
src/router/index.js

@@ -245,20 +245,73 @@ export const asyncRoutes = [
       }
     }]
   },
+  // {
+  //   path: '/module',
+  //   component: 'Layout',
+  //   children: [{
+  //     path: 'module',
+  //     name: 'Module',
+  //     component: () => import('@/views/module/module'),
+  //     meta: {
+  //       title: '动态模块',
+  //       icon: 'link'
+  //     }
+  //   }]
+  // },
   {
     path: '/module',
     component: 'Layout',
-    children: [{
-      path: 'module',
-      name: 'Module',
-      component: () => import('@/views/module/module'),
-      meta: {
-        title: '动态模块',
-        icon: 'link'
+    redirect: 'noRedirect',
+    name: 'module',
+    meta: {
+      title: '模块管理',
+      icon: 'form'
+    },
+    children: [
+      {
+        path: 'talent',
+        name: 'TalentModule',
+        component: '/module/talent',
+        meta: {
+          title: '人才模块',
+          noCache: true,
+          icon: 'stock'
+        }
+      },
+      {
+        path: 'invest',
+        name: 'InvestModule',
+        component: '/module/invest',
+        meta: {
+          title: '招商模块',
+          noCache: true,
+          icon: 'stock'
+        }
+      },
+      {
+        path: 'research',
+        name: 'ResearchModule',
+        component: '/module/research',
+        meta: {
+          title: '研发模块',
+          noCache: true,
+          icon: 'stock'
+        }
+      },
+      {
+        path: 'industry',
+        name: 'IndustryModule',
+        component: '/module/industry',
+        meta: {
+          title: '类型模块',
+          noCache: true,
+          icon: 'stock'
+        }
       }
-    }]
+    ]
   },
-  backstageRouter, {
+  backstageRouter,
+  {
     path: '*',
     redirect: '/404',
     hidden: true

+ 39 - 0
src/styles/element-ui.css

@@ -0,0 +1,39 @@
+.el-breadcrumb__inner,
+.el-breadcrumb__inner a {
+  font-weight: 400 !important;
+}
+
+.el-upload input[type="file"] {
+  display: none !important;
+}
+
+.el-upload__input {
+  display: none;
+}
+
+.el-dialog {
+  -webkit-transform: none;
+          transform: none;
+  left: 0;
+  position: relative;
+  margin: 0 auto;
+}
+
+.upload-container .el-upload {
+  width: 100%;
+}
+
+.upload-container .el-upload .el-upload-dragger {
+  width: 100%;
+  height: 200px;
+}
+
+.el-dropdown-menu a {
+  display: block;
+}
+
+.el-range-separator {
+  -webkit-box-sizing: content-box;
+          box-sizing: content-box;
+}
+/*# sourceMappingURL=element-ui.css.map */

+ 9 - 0
src/styles/element-ui.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAEA,AAAA,qBAAqB;AACrB,qBAAqB,CAAC,CAAC,CAAC;EACtB,WAAW,EAAE,cAAc;CAC5B;;AAED,AACE,UADQ,CACR,KAAK,CAAA,AAAA,IAAC,CAAK,MAAM,AAAX,EAAa;EACjB,OAAO,EAAE,eAAe;CACzB;;AAGH,AAAA,iBAAiB,CAAC;EAChB,OAAO,EAAE,IAAI;CACd;;AAID,AAAA,UAAU,CAAC;EACT,SAAS,EAAE,IAAI;EACf,IAAI,EAAE,CAAC;EACP,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,MAAM;CACf;;AAGD,AACE,iBADe,CACf,UAAU,CAAC;EACT,KAAK,EAAE,IAAI;CAMZ;;AARH,AAII,iBAJa,CACf,UAAU,CAGR,kBAAkB,CAAC;EACjB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,KAAK;CACd;;AAKL,AACE,iBADe,CACf,CAAC,CAAC;EACA,OAAO,EAAE,KACX;CAAC;;AAIH,AAAA,mBAAmB,CAAC;EAClB,UAAU,EAAE,WAAW;CACxB",
+    "sources": [
+        "element-ui.scss"
+    ],
+    "names": [],
+    "file": "element-ui.css"
+}

+ 395 - 0
src/styles/index.css

@@ -0,0 +1,395 @@
+:export {
+  menuText: #bfcbd9;
+  menuActiveText: #409EFF;
+  subMenuActiveText: #f4f4f5;
+  menuBg: #304156;
+  menuHover: #263445;
+  subMenuBg: #1f2d3d;
+  subMenuHover: #001528;
+  sideBarWidth: 210px;
+}
+
+/* fade */
+.fade-enter-active,
+.fade-leave-active {
+  -webkit-transition: opacity 0.28s;
+  transition: opacity 0.28s;
+}
+
+.fade-enter,
+.fade-leave-active {
+  opacity: 0;
+}
+
+/* fade-transform */
+.fade-transform-leave-active,
+.fade-transform-enter-active {
+  -webkit-transition: all .5s;
+  transition: all .5s;
+}
+
+.fade-transform-enter {
+  opacity: 0;
+  -webkit-transform: translateX(-30px);
+          transform: translateX(-30px);
+}
+
+.fade-transform-leave-to {
+  opacity: 0;
+  -webkit-transform: translateX(30px);
+          transform: translateX(30px);
+}
+
+/* breadcrumb transition */
+.breadcrumb-enter-active,
+.breadcrumb-leave-active {
+  -webkit-transition: all .5s;
+  transition: all .5s;
+}
+
+.breadcrumb-enter,
+.breadcrumb-leave-active {
+  opacity: 0;
+  -webkit-transform: translateX(20px);
+          transform: translateX(20px);
+}
+
+.breadcrumb-move {
+  -webkit-transition: all .5s;
+  transition: all .5s;
+}
+
+.breadcrumb-leave-active {
+  position: absolute;
+}
+
+.el-breadcrumb__inner,
+.el-breadcrumb__inner a {
+  font-weight: 400 !important;
+}
+
+.el-upload input[type="file"] {
+  display: none !important;
+}
+
+.el-upload__input {
+  display: none;
+}
+
+.el-dialog {
+  -webkit-transform: none;
+          transform: none;
+  left: 0;
+  position: relative;
+  margin: 0 auto;
+}
+
+.upload-container .el-upload {
+  width: 100%;
+}
+
+.upload-container .el-upload .el-upload-dragger {
+  width: 100%;
+  height: 200px;
+}
+
+.el-dropdown-menu a {
+  display: block;
+}
+
+.el-range-separator {
+  -webkit-box-sizing: content-box;
+          box-sizing: content-box;
+}
+
+#app .main-container {
+  min-height: 100%;
+  -webkit-transition: margin-left .28s;
+  transition: margin-left .28s;
+  margin-left: 210px;
+  position: relative;
+}
+
+#app .sidebar-container {
+  -webkit-transition: width 0.28s;
+  transition: width 0.28s;
+  width: 210px !important;
+  background-color: #304156;
+  height: 100%;
+  position: fixed;
+  font-size: 0px;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1001;
+  overflow: hidden;
+}
+
+#app .sidebar-container .horizontal-collapse-transition {
+  -webkit-transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
+  transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
+}
+
+#app .sidebar-container .scrollbar-wrapper {
+  overflow-x: hidden !important;
+}
+
+#app .sidebar-container .el-scrollbar__bar.is-vertical {
+  right: 0px;
+}
+
+#app .sidebar-container .el-scrollbar {
+  height: 100%;
+}
+
+#app .sidebar-container.has-logo .el-scrollbar {
+  height: calc(100% - 50px);
+}
+
+#app .sidebar-container .is-horizontal {
+  display: none;
+}
+
+#app .sidebar-container a {
+  display: inline-block;
+  width: 100%;
+  overflow: hidden;
+}
+
+#app .sidebar-container .svg-icon {
+  margin-right: 16px;
+}
+
+#app .sidebar-container .sub-el-icon {
+  margin-right: 12px;
+  margin-left: -2px;
+}
+
+#app .sidebar-container .el-menu {
+  border: none;
+  height: 100%;
+  width: 100% !important;
+}
+
+#app .sidebar-container .submenu-title-noDropdown:hover,
+#app .sidebar-container .el-submenu__title:hover {
+  background-color: #263445 !important;
+}
+
+#app .sidebar-container .is-active > .el-submenu__title {
+  color: #f4f4f5 !important;
+}
+
+#app .sidebar-container .nest-menu .el-submenu > .el-submenu__title,
+#app .sidebar-container .el-submenu .el-menu-item {
+  min-width: 210px !important;
+  background-color: #1f2d3d !important;
+}
+
+#app .sidebar-container .nest-menu .el-submenu > .el-submenu__title:hover,
+#app .sidebar-container .el-submenu .el-menu-item:hover {
+  background-color: #001528 !important;
+}
+
+#app .hideSidebar .sidebar-container {
+  width: 54px !important;
+}
+
+#app .hideSidebar .main-container {
+  margin-left: 54px;
+}
+
+#app .hideSidebar .submenu-title-noDropdown {
+  padding: 0 !important;
+  position: relative;
+}
+
+#app .hideSidebar .submenu-title-noDropdown .el-tooltip {
+  padding: 0 !important;
+}
+
+#app .hideSidebar .submenu-title-noDropdown .el-tooltip .svg-icon {
+  margin-left: 20px;
+}
+
+#app .hideSidebar .submenu-title-noDropdown .el-tooltip .sub-el-icon {
+  margin-left: 19px;
+}
+
+#app .hideSidebar .el-submenu {
+  overflow: hidden;
+}
+
+#app .hideSidebar .el-submenu > .el-submenu__title {
+  padding: 0 !important;
+}
+
+#app .hideSidebar .el-submenu > .el-submenu__title .svg-icon {
+  margin-left: 20px;
+}
+
+#app .hideSidebar .el-submenu > .el-submenu__title .sub-el-icon {
+  margin-left: 19px;
+}
+
+#app .hideSidebar .el-submenu > .el-submenu__title .el-submenu__icon-arrow {
+  display: none;
+}
+
+#app .hideSidebar .el-menu--collapse .el-submenu > .el-submenu__title > span {
+  height: 0;
+  width: 0;
+  overflow: hidden;
+  visibility: hidden;
+  display: inline-block;
+}
+
+#app .el-menu--collapse .el-menu .el-submenu {
+  min-width: 210px !important;
+}
+
+#app .mobile .main-container {
+  margin-left: 0px;
+}
+
+#app .mobile .sidebar-container {
+  -webkit-transition: -webkit-transform .28s;
+  transition: -webkit-transform .28s;
+  transition: transform .28s;
+  transition: transform .28s, -webkit-transform .28s;
+  width: 210px !important;
+}
+
+#app .mobile.hideSidebar .sidebar-container {
+  pointer-events: none;
+  -webkit-transition-duration: 0.3s;
+          transition-duration: 0.3s;
+  -webkit-transform: translate3d(-210px, 0, 0);
+          transform: translate3d(-210px, 0, 0);
+}
+
+#app .withoutAnimation .main-container,
+#app .withoutAnimation .sidebar-container {
+  -webkit-transition: none;
+  transition: none;
+}
+
+.el-menu--vertical > .el-menu .svg-icon {
+  margin-right: 16px;
+}
+
+.el-menu--vertical > .el-menu .sub-el-icon {
+  margin-right: 12px;
+  margin-left: -2px;
+}
+
+.el-menu--vertical .nest-menu .el-submenu > .el-submenu__title:hover,
+.el-menu--vertical .el-menu-item:hover {
+  background-color: #263445 !important;
+}
+
+.el-menu--vertical > .el-menu--popup {
+  max-height: 100vh;
+  overflow-y: auto;
+}
+
+.el-menu--vertical > .el-menu--popup::-webkit-scrollbar-track-piece {
+  background: #d3dce6;
+}
+
+.el-menu--vertical > .el-menu--popup::-webkit-scrollbar {
+  width: 6px;
+}
+
+.el-menu--vertical > .el-menu--popup::-webkit-scrollbar-thumb {
+  background: #99a9bf;
+  border-radius: 20px;
+}
+
+body {
+  height: 100%;
+  -moz-osx-font-smoothing: grayscale;
+  -webkit-font-smoothing: antialiased;
+  text-rendering: optimizeLegibility;
+  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+}
+
+label {
+  font-weight: 700;
+}
+
+html {
+  height: 100%;
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+}
+
+#app {
+  height: 100%;
+}
+
+*,
+*:before,
+*:after {
+  -webkit-box-sizing: inherit;
+          box-sizing: inherit;
+}
+
+a:focus,
+a:active {
+  outline: none;
+}
+
+a,
+a:focus,
+a:hover {
+  cursor: pointer;
+  color: inherit;
+  text-decoration: none;
+}
+
+div:focus {
+  outline: none;
+}
+
+.clearfix:after {
+  visibility: hidden;
+  display: block;
+  font-size: 0;
+  content: " ";
+  clear: both;
+  height: 0;
+}
+
+.app-container {
+  padding: 20px;
+}
+
+.hoverImg {
+  display: block;
+  width: 40px;
+  height: 40px;
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  border-radius: 10px;
+  margin-left: -20px;
+  margin-top: -20px;
+  -webkit-transform-origin: 75% 75%;
+          transform-origin: 75% 75%;
+}
+
+.hoverImg:hover {
+  -webkit-transform-origin: 75% 75%;
+          transform-origin: 75% 75%;
+  -webkit-transform: scale(1.4);
+          transform: scale(1.4);
+  max-width: 100%;
+  max-height: 100%;
+  width: auto;
+  height: auto;
+  -webkit-transition: 0.3s;
+  transition: 0.3s;
+  z-index: 999;
+}
+/*# sourceMappingURL=index.css.map */

File diff suppressed because it is too large
+ 2 - 0
src/styles/index.css.map


+ 1 - 0
src/styles/mixin.css

@@ -0,0 +1 @@
+/* No CSS *//*# sourceMappingURL=mixin.css.map */

+ 9 - 0
src/styles/mixin.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "",
+    "sources": [
+        "mixin.scss"
+    ],
+    "names": [],
+    "file": "mixin.css"
+}

+ 54 - 0
src/styles/transition.css

@@ -0,0 +1,54 @@
+/* fade */
+.fade-enter-active,
+.fade-leave-active {
+  -webkit-transition: opacity 0.28s;
+  transition: opacity 0.28s;
+}
+
+.fade-enter,
+.fade-leave-active {
+  opacity: 0;
+}
+
+/* fade-transform */
+.fade-transform-leave-active,
+.fade-transform-enter-active {
+  -webkit-transition: all .5s;
+  transition: all .5s;
+}
+
+.fade-transform-enter {
+  opacity: 0;
+  -webkit-transform: translateX(-30px);
+          transform: translateX(-30px);
+}
+
+.fade-transform-leave-to {
+  opacity: 0;
+  -webkit-transform: translateX(30px);
+          transform: translateX(30px);
+}
+
+/* breadcrumb transition */
+.breadcrumb-enter-active,
+.breadcrumb-leave-active {
+  -webkit-transition: all .5s;
+  transition: all .5s;
+}
+
+.breadcrumb-enter,
+.breadcrumb-leave-active {
+  opacity: 0;
+  -webkit-transform: translateX(20px);
+          transform: translateX(20px);
+}
+
+.breadcrumb-move {
+  -webkit-transition: all .5s;
+  transition: all .5s;
+}
+
+.breadcrumb-leave-active {
+  position: absolute;
+}
+/*# sourceMappingURL=transition.css.map */

+ 9 - 0
src/styles/transition.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAEA,UAAU;AACV,AAAA,kBAAkB;AAClB,kBAAkB,CAAC;EACjB,UAAU,EAAE,aAAa;CAC1B;;AAED,AAAA,WAAW;AACX,kBAAkB,CAAC;EACjB,OAAO,EAAE,CAAC;CACX;;AAED,oBAAoB;AACpB,AAAA,4BAA4B;AAC5B,4BAA4B,CAAC;EAC3B,UAAU,EAAE,OAAO;CACpB;;AAED,AAAA,qBAAqB,CAAC;EACpB,OAAO,EAAE,CAAC;EACV,SAAS,EAAE,iBAAiB;CAC7B;;AAED,AAAA,wBAAwB,CAAC;EACvB,OAAO,EAAE,CAAC;EACV,SAAS,EAAE,gBAAgB;CAC5B;;AAED,2BAA2B;AAC3B,AAAA,wBAAwB;AACxB,wBAAwB,CAAC;EACvB,UAAU,EAAE,OAAO;CACpB;;AAED,AAAA,iBAAiB;AACjB,wBAAwB,CAAC;EACvB,OAAO,EAAE,CAAC;EACV,SAAS,EAAE,gBAAgB;CAC5B;;AAED,AAAA,gBAAgB,CAAC;EACf,UAAU,EAAE,OAAO;CACpB;;AAED,AAAA,wBAAwB,CAAC;EACvB,QAAQ,EAAE,QAAQ;CACnB",
+    "sources": [
+        "transition.scss"
+    ],
+    "names": [],
+    "file": "transition.css"
+}

+ 11 - 0
src/styles/variables.css

@@ -0,0 +1,11 @@
+:export {
+  menuText: #bfcbd9;
+  menuActiveText: #409EFF;
+  subMenuActiveText: #f4f4f5;
+  menuBg: #304156;
+  menuHover: #263445;
+  subMenuBg: #1f2d3d;
+  subMenuHover: #001528;
+  sideBarWidth: 210px;
+}
+/*# sourceMappingURL=variables.css.map */

+ 9 - 0
src/styles/variables.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAeA,AAAA,OAAO,CAAC;EACN,QAAQ,EAfA,OAAO;EAgBf,cAAc,EAfA,OAAO;EAgBrB,iBAAiB,EAfA,OAAO;EAgBxB,MAAM,EAdA,OAAO;EAeb,SAAS,EAdA,OAAO;EAehB,SAAS,EAbA,OAAO;EAchB,YAAY,EAbA,OAAO;EAcnB,YAAY,EAZC,KAAK;CAanB",
+    "sources": [
+        "variables.scss"
+    ],
+    "names": [],
+    "file": "variables.css"
+}

+ 6 - 10
src/views/company/edit.vue

@@ -51,7 +51,7 @@
               (建议尺寸画布600*480,大小50K)
             </div>
           </el-upload>
-          <div class="flexS" style="flex-wrap: wrap;" v-if="ruleForm.img&&ruleForm.img.length > 0">
+          <div class="flexS" style="flex-wrap: wrap;" v-if="ruleForm.img && ruleForm.img.length > 0">
             <div v-for="(item, i) in ruleForm.img" :key="i" class="banner_item">
               <el-image :src="item" style="width: 100px;height: 100px;margin:0 10px 0 10px;"
                 :preview-src-list="ruleForm.img" />
@@ -91,11 +91,7 @@ export default {
     return {
       id: '',
       categoryList: [], // 类型列表
-      formData: {
-        value: "",
-      },
       dialogVisible: false,
-      value1: '',
       ruleForm: {
         name: '',
         industry: '',
@@ -147,13 +143,13 @@ export default {
         ],
         achievement: [
           { required: true, message: '请输入研究成果', trigger: 'blur' }
-        ],
+        ]
       }
     };
   },
   created() {
     this.getCategory()
-    let id = this.$route.params.id
+    const id = this.$route.params.id
     if (id) {
       this.getInfo(id)
       this.id = id
@@ -177,7 +173,7 @@ export default {
             is_service,
             is_research,
             introduction,
-            img,
+            img: img ? img : [],
             honor,
             service_info,
             achievement,
@@ -197,10 +193,10 @@ export default {
           const data = this.id ? { name, industry, high_tech, datatype, parks, is_leading, is_service, is_research, introduction, img, honor, service_info, achievement, sort, id: this.id } : this.ruleForm
           http(data).then(res => {
             if (res.code === 200) {
-              this.$message.success(this.id ? '添加成功!' : '修改成功')
+              this.$message.success(this.id ? '修改成功!' : '添加成功')
               this.$router.push('/company/company')
             } else {
-              this.$message.success(this.id ? '添加失败!' : '修改失败' || res.msg)
+              this.$message.success(this.id ? '修改失败!' : '添加失败' || res.msg)
             }
           })
         } else {

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

@@ -82,10 +82,9 @@
                 <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: children.length > 0 ? '200px' : '300px' }" filterable clearableruleFormruleForm
-                        value-key="id">
+                        value-key="id" @change="selectOne">
                         <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" @click.stop="editItem(item.id, 1, temp, i)">
                                 <i class="el-icon-edit-outline" />
                             </span>

+ 1 - 1
src/views/company/project.vue

@@ -51,7 +51,7 @@
                     <el-input v-model="ruleForm.name" placeholder="请输入项目名称" style="width:300px" />
                 </el-form-item>
                 <el-form-item label="项目金额:" prop="amount">
-                    <el-input v-model="ruleForm.amount" placeholder="请输入项目金额" style="width:300px" />
+                    <el-input v-model="ruleForm.amount" placeholder="请输入项目金额" style="width:300px" type="number" />
                 </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"

+ 50 - 1
src/views/company/talents.vue

@@ -13,6 +13,8 @@
         @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="handleDesc" type="primary" style="margin-right:24px;">人才概述</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>
@@ -102,6 +104,42 @@
       </el-form>
 
     </el-drawer>
+    <!-- <el-dialog title="提示" :visible.sync="descDialogVisible" width="50%">
+      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
+        <el-form-item label="概述一:" prop="name">
+          <template>
+            <div>
+              <textarea name="" id="" cols="30" rows="10"></textarea>
+              <el-button>编辑</el-button>
+              <el-button>保存</el-button>
+            </div>
+          </template>
+        </el-form-item>
+        <el-form-item label="概述二:" prop="name">
+          <template>
+            <div>
+              <textarea name="" id="" cols="30" rows="10"></textarea>
+              <el-button>编辑</el-button>
+              <el-button>保存</el-button>
+            </div>
+          </template>
+        </el-form-item>
+        <el-form-item label="概述三:" prop="name">
+          <template>
+            <div>
+              <textarea name="" id="" cols="30" rows="10"></textarea>
+              <el-button>编辑</el-button>
+              <el-button>保存</el-button>
+            </div>
+          </template>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+      </span>
+    </el-dialog> -->
+
     <div class="paging_box">
       <pagination :total="listDataTotal" :limit="params.page_size" :page="params.page_index"
         @pagination="changePagination" @update:limit="changePagination" />
@@ -109,12 +147,13 @@
   </div>
 </template>
 <script>
-import { talentList, addTalent, editTalent, deleteTalent, importTalent, talentCategory, companyAll } from '@/api/company'
+import { talentList, addTalent, editTalent, deleteTalent, importTalent, talentCategory, companyAll, talentModule } from '@/api/company'
 import { uploadFile } from '@/api/upload.js'
 import { addCategory, editCategory, deleteCategory } from '@/api/category'
 export default {
   data() {
     return {
+      descDialogVisible: false, //人才概述弹窗
       isEdit: false,
       categoryList: [],
       category: [],
@@ -181,6 +220,16 @@ export default {
     this.getCompany()
   },
   methods: {
+    // //人才概述
+    // handleDesc() {
+    //   this.descDialogVisible = true
+    //   talentModule().then(res => {
+    //     const { data, code, msg } = res
+    //     if (code === 200) {
+    //       console.log(data)
+    //     }
+    //   })
+    // },
     // 修改类型
     editItem(fid, isEdit, info, idx) {
       this.addItem(fid, isEdit, info, idx)

+ 2 - 4
src/views/friendlyLinks/list.vue

@@ -59,7 +59,7 @@ export default {
   data() {
     return {
       dialogVisible: false,
-      loadingFull:false,
+      loadingFull: false,
       listData: [],
       listDataTotal: 0,
       type: '',
@@ -82,9 +82,6 @@ export default {
         url: [
           { required: true, message: '请输入url', trigger: 'blur' }
         ],
-        sort: [
-          { required: true, message: '请输入排名', trigger: 'blur' }
-        ],
         introduction: [
           { required: true, message: '请输入简介', trigger: 'blur' }
         ]
@@ -168,6 +165,7 @@ export default {
           const data = this.type === 0 ? this.ruleForm : { name, introduction, url, sort, id: this.id }
           http(data).then(res => {
             if (res.code === 200) {
+              this.getList()
               this.$message.success(this.type === 0 ? '添加成功!' : '修改成功!')
               this.dialogVisible = false
             } else {

+ 321 - 0
src/views/module/industry.vue

@@ -0,0 +1,321 @@
+<!-- 动态模块 -->
+<template>
+    <div class="content">
+        <div v-loading.fullscreen.lock="loadingFull" />
+        <div class="search_box">
+            <!-- <el-button @click="dialogVisible = true" type="primary" style="margin-right:24px;">添加行业简介</el-button> -->
+        </div>
+        <div class="table_box">
+            <el-table ref="list" :data="listData" align="center" :header-cell-style="{ background: '#f8fbfc' }"
+                class="tableBorder" border stripe>
+                <el-table-column prop="title" label="标题" align="center" />
+                <el-table-column label="操作" align="center" width="280">
+                    <template slot-scope="{row}">
+                        <el-button type="text" size="mini" @click="handleEdit(true, row)">编辑</el-button>
+                        <el-button type="text" size="mini" @click="handleDelete(row)">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </div>
+        <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" required>
+                    <el-input v-model="ruleForm.title" :disabled="isEdit ? true : false"></el-input>
+                </el-form-item>
+                <el-form-item v-for="(item, i) in categoryList  " :key="i" :label="item.name" :prop="item.mark"
+                    v-if="!isEdit">
+                    <el-select v-model="ruleForm[item.mark]" :placeholder="'请选择' + item.name" :ref="'template_' + i"
+                        :style="{ width: '300px' }" filterable clearableruleFormruleForm style="width:300px"
+                        @change="handleChange" value-key="id">
+                        <el-option v-for="(  temp, idx  ) in   item.children  " :key="idx" :label="temp.name" :value="temp">
+                            <span style="float: left" class="span-style">{{ temp.name }}</span>
+                            <span style="float: right;margin-left:5px;" class="span-style"
+                                @click.stop="editItem(item.id, 1, temp, i)">
+                                <i class="el-icon-edit-outline" />
+                            </span>
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="内容:" prop="content" required>
+                    <tinymce v-model="ruleForm.content" :height="300" width="85%" :showUpload="false" menubar=""/>
+                </el-form-item>
+                <el-form-item>
+                    <el-button @click="dialogVisible = false">取 消</el-button>
+                    <el-button type="primary" @click="submitForm('ruleForm')">{{ !isEdit ? '确 定' : '保存' }}</el-button>
+                </el-form-item>
+            </el-form>
+
+        </el-drawer>
+        <!-- <div class="paging_box">
+            <pagination :total="listDataTotal" :limit="params.page_size" :page="params.page_index"
+                @pagination="changePagination" @update:limit="changePagination" />
+        </div> -->
+    </div>
+</template>
+<script>
+import { addModule, editModule, deleteModule, moduleCategory, moduleBlock, talentModule, industryModule } from '@/api/module'
+import Tinymce from '@/components/Tinymce'
+import { addCategory, editCategory, deleteCategory } from '@/api/category'
+export default {
+    data() {
+        return {
+            isIntr: false,
+            categoryList: [], // 类型列表
+            dialogVisible: false,
+            intrDialogVisible: false,
+            loadingFull: false,
+            listData: [],
+            listDataTotal: 0,
+            id: '',// 当前修改公告的id
+            isEdit: false,
+            ruleForm: {
+                title: '',
+                content: '',
+                industry: '',
+                mark: ''
+            },
+            params: {
+                page_index: 1,
+                page_size: 10,
+                search: '',
+                type: ''
+            },
+            rules: {
+                title: [
+                    { required: true, message: '请输入标题', trigger: 'blur' }
+                ],
+                content: [
+                    { required: true, message: '请输入内容', trigger: 'blur' }
+                ],
+                industry: [
+                    { required: true, message: '请选择行业类型', trigger: 'change' }
+                ]
+            }
+        }
+    },
+    mounted() {
+        this.getList()
+        this.getCategory()
+    },
+    components: { Tinymce },
+    methods: {
+        handleChange(e) {
+            console.log(e, 'e')
+            this.ruleForm.title = e.name + '行业简介'
+        },
+        // 修改类型
+        editItem(fid, isEdit, info, idx) {
+            this.addItem(fid, isEdit, info, idx)
+        },
+        // 添加/修改类型
+        addItem(fid, isEdit, info, idx) {
+            if (info && info != null && isEdit === 1) {
+                this.$message.error('无可编辑内容')
+                return
+            }
+            let val = ''
+            if (info) {
+                const index = this.categoryList[idx].children.findIndex((e) => e.id === info.id)
+                const obj = this.categoryList[idx].children[index]
+                val = obj.name
+            }
+            this.$prompt(' 请输入新的类型名称 ', isEdit === 1 ? '编辑' : '添加', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                inputValue: val
+            }).then(async ({ value }) => {
+                if (!value || value === '') {
+                    this.$message.error('类型名称不能为空!')
+                } else {
+                    const http = isEdit === 1 ? editCategory : addCategory
+                    const data = isEdit === 1 ? { fid, id: info.id, name: value } : { fid, name: value }
+                    http(data).then(res => {
+                        if (res.code === 200) {
+                            this.$message.success(isEdit === 1 ? '修改类型成功' : '添加类型成功')
+                            this.getCategory()
+                        } else {
+                            this.$message.success(res.msg || isEdit === 1 ? '修改类型失败' : '添加类型失败')
+                        }
+                    })
+                }
+            })
+        },
+        // 删除类型
+        deleteItem(info) {
+            this.$confirm("确定要删除" + "' " + info.name + " '" + "吗?", "删除", {
+                type: 'warning'
+            })
+                .then(() => {
+                    // 本地静态删除
+                    deleteCategory({ id: info.id }).then(res => {
+                        if (res.code === 200) {
+                            this.$message.success('删除成功')
+                            this.getCategory()
+                        } else {
+                            this.$message.error(res.message || '删除失败')
+                        }
+                    })
+                })
+                .catch(() => { });
+        },
+        // 下拉时显示底下的新增按钮
+        visibleChange(visible, refName, fid) {
+            if (visible) {
+                const ref = this.$refs[refName][0];
+                let product = ref.$refs.popper;
+                if (product.$el) product = product.$el;
+                if (
+                    !Array.from(product.children).some(
+                        (v) => v.className === "el-template-menu__list"
+                    )
+                ) {
+                    const el = document.createElement("ul");
+                    el.className = "el-template-menu__list";
+                    el.style =
+                        "border-top:2px solid rgb(219 225 241); padding:0; color:rgb(64 158 255);font-size: 13px";
+                    el.innerHTML = `<li class="el-cascader-node text-center" style="height:37px;line-height: 50px;margin-left:10px;">
+              <span class="el-cascader-node__label"><i class="font-blue el-icon-plus"></i> 新增公告</span>
+              </li>`;
+                    product.appendChild(el);
+                    // 新增按钮点击事件
+                    el.onclick = () => {
+                        this.addItem(fid, 0);
+                    };
+                }
+            }
+        },
+        // 获取分类列表
+        async getCategory() {
+            this.options = []
+            try {
+                const res = await moduleCategory()
+                const { message, code, data } = res
+                if (code === 200) {
+                    this.categoryList = data
+                } else {
+                    this.$message.error(message)
+                }
+            } catch (e) {
+                console.log(`获取列表失败:${e}`)
+            }
+        },
+        // 搜索
+        toSearch() {
+            this.params.page_index = 1
+            this.getList()
+        },
+        reset() {
+            this.ruleForm = {
+                title: '',
+                content: '',
+                mark: '',
+                industry: ''
+            }
+        },
+        // 编辑或者添加信息
+        handleEdit(isEdit, row) {
+            this.dialogVisible = true
+            this.isEdit = isEdit
+            if (!isEdit) { // 添加
+                this.reset()
+
+            } else { // 编辑
+                this.id = row.id
+                const { title, content, mark } = row
+                if (row.mark) {
+                    this.intrDialogVisible = true
+                } else {
+                    this.dialogVisible = true
+                }
+
+                this.ruleForm = {
+                    title,
+                    content,
+                    mark
+                }
+            }
+        },
+        // 获取列表
+        async getList() {
+            this.loadingFull = true
+            try {
+                const res = await industryModule()
+                const { message, code, data } = res
+                if (code === 200) {
+                    this.listData = data
+                } else {
+                    this.$message.error(message)
+                }
+            } catch (e) {
+                console.log(`获取列表失败:${e}`)
+                this.loadingFull = false
+            }
+            this.loadingFull = false
+        },
+        // 添加/编辑事件
+        submitForm(formName) {
+            this.$refs[formName].validate((valid) => {
+                if (valid) {
+                    this.ruleForm.mark = this.ruleForm.industry ? 'industry-' + this.ruleForm.industry.id : ''
+                    const http = this.isEdit ? editModule : addModule
+                    const { title, content, mark } = this.ruleForm
+                    const data = this.isEdit ? { title, content, mark, id: this.id } : { title, content, mark }
+                    http(data).then(res => {
+                        if (res.code === 200) {
+                            this.$message.success(this.isEdit ? '修改成功!' : '添加成功!')
+                            this.getList()
+                            this.dialogVisible = false
+                        } else {
+                            this.$message.error(this.isEdit ? '修改失败!' : '添加失败!')
+                            this.$message.error(res.msg)
+                        }
+                    })
+                } else {
+                    console.log('error submit!!')
+                    return false
+                }
+            })
+        },
+        // 删除确认
+        handleDelete(row) {
+            const { id } = row
+            this.$confirm('确认要删除该信息吗?', '删除确认', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.deleteEvent(id)
+            })
+        },
+        // 删除事件
+        async deleteEvent(id) {
+            const res = await deleteModule({ id })
+            try {
+                const { message, code } = res
+                if (code === 200) {
+                    this.$message.success('删除成功!')
+                    this.getList()
+                } else {
+                    this.$message.error(message)
+                }
+            } catch (e) {
+                this.$message.error(e.message)
+            }
+        },
+        // 分页页码变化
+        changePagination(data) {
+            const { page, limit } = data
+            this.params.page_size = limit
+            this.params.page_index = page
+            this.getList()
+        }
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+.el-input,
+textarea {
+    width: 350px;
+}
+</style>

+ 94 - 0
src/views/module/invest.vue

@@ -0,0 +1,94 @@
+<template>
+    <div class="content">
+        <div>
+            <div class="title">投资数据年份</div>
+            <div>
+                <el-date-picker v-model="date.content" type="datetime" placeholder="选择日期时间" style="width:300px"
+                    format="yyyy" value-format="yyyy" :disabled="isDateEdit ? false : true">
+                </el-date-picker>
+                <div style="margin:20px 0;">
+                    <el-button @click="isDateEdit = true" type="primary">编辑</el-button>
+                    <el-button @click="save(date, 0)" type="primary">保存</el-button>
+                </div>
+            </div>
+        </div>
+        <div v-for="(item, i) in list" :key="i">
+            <div class="title">
+                招商模块第{{ i + 1 }}块
+            </div>
+            <div>
+                <textarea name="" id="" cols="80" rows="8" v-model="item.content"
+                    :disabled="item.isEdit ? false : true"></textarea>
+                <div style="margin:20px 0;">
+                    <el-button @click="item.isEdit = !item.isEdit" type="primary">编辑</el-button>
+                    <el-button @click="save(item, 1, i)" type="primary">保存</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import { investModule, editModule } from '@/api/module'
+import Tinymce from '@/components/Tinymce'
+export default {
+    data() {
+        return {
+            moduleData: '',
+            list: '',
+            date: '',
+            isDateEdit: false
+        }
+    },
+    mounted() {
+        this.getModule()
+    },
+    methods: {
+        getModule() {
+            investModule().then(res => {
+                const { code, data, msg } = res
+                if (code === 200) {
+                    this.date = data.date
+                    const list = data.info
+                    list.map(i => {
+                        this.$set(i, 'isEdit', false)
+                    })
+                    this.list = list
+                    console.log(data)
+                }
+            })
+        },
+        save(info, type, idx) {
+            const { content, title, id } = info
+            if (!content) {
+                this.$message.error('内容不能为空')
+                return
+            }
+            editModule({ id, title, content }).then(res => {
+                const { code, msg } = res
+                if (code === 200) {
+                    this.$message.success('修改成功')
+                    if (type === 1) {
+                        this.list[idx].isEdit = false
+                    } else {
+                        this.isDateEdit = false
+                    }
+
+                } else {
+                    this.$message.error(msg)
+                }
+            })
+        },
+    },
+    components: { Tinymce },
+
+}
+</script>
+<style lang="scss" scoped>
+.content {
+    .title {
+        font-size: 18px;
+        font-weight: bold;
+        margin-bottom: 12px;
+    }
+}
+</style>

+ 9 - 3
src/views/module/module.vue

@@ -25,7 +25,7 @@
                     <el-input v-model="ruleForm.title" placeholder="请输入标题" style="width:300px" />
                 </el-form-item>
                 <el-form-item label="内容:" prop="content" required>
-                    <tinymce v-model="ruleForm.content" :height="300" width="85%" :showUpload="false" />
+                    <textarea name="" id="" cols="30" rows="10" v-model="ruleForm.content"></textarea>
                 </el-form-item>
                 <el-form-item>
                     <el-button @click="dialogVisible = false">取 消</el-button>
@@ -70,7 +70,7 @@
     </div>
 </template>
 <script>
-import { moduleList, addModule, editModule, deleteModule, moduleCategory } from '@/api/module'
+import { moduleList, addModule, editModule, deleteModule, moduleCategory, moduleBlock, talentModule } from '@/api/module'
 import Tinymce from '@/components/Tinymce'
 import { addCategory, editCategory, deleteCategory } from '@/api/category'
 export default {
@@ -113,6 +113,12 @@ export default {
     mounted() {
         this.getList()
         this.getCategory()
+        moduleBlock().then(res => {
+            console.log(res, 111)
+        })
+        talentModule().then(res => {
+            console.log(res.data, 'data')
+        })
     },
     components: { Tinymce },
     methods: {
@@ -274,7 +280,7 @@ export default {
         submitForm(formName) {
             this.$refs[formName].validate((valid) => {
                 if (valid) {
-                    this.ruleForm.mark = 'industry-' + this.ruleForm.industry
+                    this.ruleForm.mark = this.ruleForm.industry ? 'industry-' + this.ruleForm.industry : ''
                     const http = this.isEdit ? editModule : addModule
                     const { title, content, mark } = this.ruleForm
                     const data = this.isEdit ? { title, content, mark, id: this.id } : { title, content, mark }

+ 91 - 0
src/views/module/research.vue

@@ -0,0 +1,91 @@
+<template>
+    <div class="content">
+        <div v-for="(item, i) in list" :key="i">
+            <div class="title">
+                {{ item.title }}
+            </div>
+            <div>
+                <el-input v-model="item.content" style="width:200px;" :disabled="item.isEdit ? false : true"></el-input>
+                <span style="margin-left:10px;">亿元</span>
+                <div style="margin:20px 0;">
+                    <el-button @click="item.isEdit = !item.isEdit" type="primary">编辑</el-button>
+                    <el-button @click="save(item, 1, i)" type="primary">保存</el-button>
+                </div>
+            </div>
+        </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(info, 1, i)" type="primary">保存</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import Tinymce from '@/components/Tinymce'
+import { researchModule, editModule } from '@/api/module'
+export default {
+    data() {
+        return {
+            moduleData: '',
+            list: '',
+            info: '',
+            isDateEdit: false
+        }
+    },
+    components: { Tinymce },
+    mounted() {
+        this.getModule()
+    },
+    methods: {
+        getModule() {
+            researchModule().then(res => {
+                const { code, data, msg } = res
+                if (code === 200) {
+                    const list = data.level
+                    this.info = data.info
+                    list.map(i => {
+                        this.$set(i, 'isEdit', false)
+                    })
+                    this.list = list
+                    console.log(data)
+                } else {
+                    this.$message.error(msg)
+                }
+            })
+        },
+        save(info, type, idx) {
+            const { content, title, id } = info
+            if (!content) {
+                this.$message.error('内容不能为空')
+                return
+            }
+            editModule({ id, title, content }).then(res => {
+                const { code, msg } = res
+                if (code === 200) {
+                    this.$message.success('修改成功')
+                    if (type === 1) {
+                        this.list[idx].isEdit = false
+                    } else {
+                        this.isDateEdit = false
+                    }
+
+                } else {
+                    this.$message.error(msg)
+                }
+            })
+        },
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+.content {
+    .title {
+        font-size: 18px;
+        font-weight: bold;
+        margin-bottom: 12px;
+    }
+}
+</style>

+ 92 - 0
src/views/module/talent.vue

@@ -0,0 +1,92 @@
+<template>
+    <div class="content">
+        <div>
+            <div class="title">人才数据截止日期</div>
+            <div>
+                <el-date-picker v-model="date.content" type="datetime" placeholder="选择日期时间" style="width:300px"
+                    format="yyyy-MM" value-format="yyyy-MM" :disabled="isDateEdit ? false : true">
+                </el-date-picker>
+                <div style="margin:20px 0;">
+                    <el-button @click="isDateEdit = true" type="primary">编辑</el-button>
+                    <el-button @click="save(date, 0)" type="primary">保存</el-button>
+                </div>
+            </div>
+        </div>
+        <div v-for="(item, i) in list" :key="i">
+            <div class="title">
+                人才模块第{{ i + 1 }}块
+            </div>
+            <div>
+                <textarea name="" id="" cols="80" rows="8" v-model="item.content"
+                    :disabled="item.isEdit ? false : true"></textarea>
+                <div style="margin:20px 0;">
+                    <el-button @click="item.isEdit = !item.isEdit" type="primary">编辑</el-button>
+                    <el-button @click="save(item, 1, i)" type="primary">保存</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import { talentModule, editModule } from '@/api/module'
+export default {
+    data() {
+        return {
+            moduleData: '',
+            list: '',
+            date: '',
+            isDateEdit: false
+        }
+    },
+    mounted() {
+        this.getModule()
+    },
+    methods: {
+        getModule() {
+            talentModule().then(res => {
+                const { code, data, msg } = res
+                if (code === 200) {
+                    this.date = data.date
+                    const list = data.info
+                    list.map(i => {
+                        this.$set(i, 'isEdit', false)
+                    })
+                    this.list = list
+                    console.log(data)
+                }
+            })
+        },
+        save(info, type, idx) {
+            const { content, title, id } = info
+            if (!content) {
+                this.$message.error('内容不能为空')
+                return
+            }
+            editModule({ id, title, content }).then(res => {
+                const { code, msg } = res
+                if (code === 200) {
+                    this.$message.success('修改成功')
+                    if (type === 1) {
+                        this.list[idx].isEdit = false
+                    } else {
+                        this.isDateEdit = false
+                    }
+
+                } else {
+                    this.$message.error(msg)
+                }
+            })
+        },
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+.content {
+    .title {
+        font-size: 18px;
+        font-weight: bold;
+        margin-bottom: 12px;
+    }
+}
+</style>

+ 1 - 1
vue.config.js

@@ -7,7 +7,7 @@ function resolve(dir) {
 module.exports = {
   publicPath: './',
   outputDir: 'dist',
-  assetsDir: 'static',
+  assetsDir: 'admin/static',
   // lintOnSave: process.env.NODE_ENV === 'development',
   lintOnSave: false,
   productionSourceMap: false,

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