优化开发展示
This commit is contained in:
		| @@ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <div id="app"> |   <div id="app"> | ||||||
|     <header-nav v-if="showTools" :title="serveName"> |     <header-nav v-if="showTools" title="web端产品库"> | ||||||
|       <template #right> |       <template #right> | ||||||
|         <div @click="showTools=false">隐藏工具栏</div> |         <div @click="showTools=false">隐藏工具栏</div> | ||||||
|         <div @click="handleLogin">点此登录</div> |         <div @click="handleLogin">点此登录</div> | ||||||
| @@ -29,13 +29,6 @@ export default { | |||||||
|   components: {HeaderNav, MainContent, SliderNav}, |   components: {HeaderNav, MainContent, SliderNav}, | ||||||
|   computed: { |   computed: { | ||||||
|     ...mapState(['user']), |     ...mapState(['user']), | ||||||
|     serveName() { |  | ||||||
|       let names = { |  | ||||||
|         development: "村微产品库", |  | ||||||
|         oms: "运营平台产品分库", |  | ||||||
|       } |  | ||||||
|       return names[process.env.NODE_ENV] |  | ||||||
|     }, |  | ||||||
|     login() { |     login() { | ||||||
|       let url = '/auth/oauth/token'; |       let url = '/auth/oauth/token'; | ||||||
|       /project\/sass/g.test(location.pathname) && (url += "?corpId=ww596787bb70f08288") |       /project\/sass/g.test(location.pathname) && (url += "?corpId=ww596787bb70f08288") | ||||||
| @@ -75,9 +68,6 @@ export default { | |||||||
|   created() { |   created() { | ||||||
|     if (this.user.token) this.getUserInfo() |     if (this.user.token) this.getUserInfo() | ||||||
|     wx = jWeixin |     wx = jWeixin | ||||||
|   }, |  | ||||||
|   mounted() { |  | ||||||
|     document.title = this.serveName |  | ||||||
|   } |   } | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ | |||||||
|         <ai-empty>欢迎使用村微产品库</ai-empty> |         <ai-empty>欢迎使用村微产品库</ai-empty> | ||||||
|       </el-tab-pane> |       </el-tab-pane> | ||||||
|       <el-tab-pane v-for="op in tabs" :key="op.name" :closable="op.name!='工作台'" :name="op.name" :label="op.label" lazy> |       <el-tab-pane v-for="op in tabs" :key="op.name" :closable="op.name!='工作台'" :name="op.name" :label="op.label" lazy> | ||||||
|         <router-view/> |         <router-view v-if="currentTab==tabs.name"/> | ||||||
|       </el-tab-pane> |       </el-tab-pane> | ||||||
|     </el-tabs> |     </el-tabs> | ||||||
|   </section> |   </section> | ||||||
|   | |||||||
| @@ -8,6 +8,7 @@ | |||||||
|              @click.stop="openKidMenu(item)"> |              @click.stop="openKidMenu(item)"> | ||||||
|           <i class="prep-icon" :class="item.style||'iconfont iconloudongmoxing'"/> |           <i class="prep-icon" :class="item.style||'iconfont iconloudongmoxing'"/> | ||||||
|           <span class="menuName fill" v-text="item.label"/> |           <span class="menuName fill" v-text="item.label"/> | ||||||
|  |           <el-badge type="warning" :hidden="!item.project" :value="item.project"/> | ||||||
|           <i v-if="item.children" class="iconfont" :class="arrowIcon(item.showChildren)"/> |           <i v-if="item.children" class="iconfont" :class="arrowIcon(item.showChildren)"/> | ||||||
|         </div> |         </div> | ||||||
|         <div class="kidMenu" v-if="item.showChildren" @click.stop> |         <div class="kidMenu" v-if="item.showChildren" @click.stop> | ||||||
| @@ -41,7 +42,14 @@ export default { | |||||||
|     ...mapState(['user', 'apps']), |     ...mapState(['user', 'apps']), | ||||||
|     navs() { |     navs() { | ||||||
|       let reg = new RegExp(`.*${this.searchApp?.replace(/-/g,'')||''}.*`, 'gi') |       let reg = new RegExp(`.*${this.searchApp?.replace(/-/g,'')||''}.*`, 'gi') | ||||||
|       return (this.apps || []).filter(e => !this.searchApp || reg?.test(e.name) || reg?.test(e.label)) |       return (this.apps || []).filter(e => !this.searchApp || reg?.test(e.name) || reg?.test(e.label)).map(e => { | ||||||
|  |         if (/project/.test(e.path)) { | ||||||
|  |           e.project = e.path.replace(/.*project\/([^\/]+)\/.+/, '$1') | ||||||
|  |         } else if (/core/.test(e.path)) { | ||||||
|  |           e.project = "core" | ||||||
|  |         } | ||||||
|  |         return e | ||||||
|  |       }) | ||||||
|     }, |     }, | ||||||
|     isConsoleRoute() { |     isConsoleRoute() { | ||||||
|       return this.$route.name == "工作台" |       return this.$route.name == "工作台" | ||||||
| @@ -104,7 +112,7 @@ export default { | |||||||
| </script> | </script> | ||||||
| <style lang="scss" scoped> | <style lang="scss" scoped> | ||||||
| .sliderNav { | .sliderNav { | ||||||
|   width: 200px; |   min-width: 200px; | ||||||
|   height: 100%; |   height: 100%; | ||||||
|   transition: width .1s; |   transition: width .1s; | ||||||
|   display: flex; |   display: flex; | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
|   "author": "kubbo", |   "author": "kubbo", | ||||||
|   "main": "lib/cw-webapps.common.js", |   "main": "lib/cw-webapps.common.js", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "serve": "vue-cli-service serve", |     "dev": "vue-cli-service serve", | ||||||
|     "lib": "vue-cli-service build --no-clean --target lib --dest lib packages/index.js&&npm unpublish --force&&npm publish", |     "lib": "vue-cli-service build --no-clean --target lib --dest lib packages/index.js&&npm unpublish --force&&npm publish", | ||||||
|     "lib:core": "vue-cli-service build --target lib --dest core/dist core/index.js --name dvcp-core&&npm unpublish dvcp-core --force&&npm publish core/", |     "lib:core": "vue-cli-service build --target lib --dest core/dist core/index.js --name dvcp-core&&npm unpublish dvcp-core --force&&npm publish core/", | ||||||
|     "lib:project": "node project/build.js", |     "lib:project": "node project/build.js", | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ import Add from './components/Add' | |||||||
| import BuildMsg from './components/BuildMsg' | import BuildMsg from './components/BuildMsg' | ||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   label: '楼栋管理(sass)', |   label: '楼栋管理', | ||||||
|   name: 'AppBuildManage', |   name: 'AppBuildManage', | ||||||
|   props: { |   props: { | ||||||
|     instance: Function, |     instance: Function, | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ import ResidentSta from "./residentSta"; | |||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   name: "AppResident", |   name: "AppResident", | ||||||
|   label: "居民档案(saas)", |   label: "居民档案", | ||||||
|   props: { |   props: { | ||||||
|     instance: Function, |     instance: Function, | ||||||
|     dict: Object, |     dict: Object, | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ import Add from "./components/add"; | |||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   name: "AppGridBlock", |   name: "AppGridBlock", | ||||||
|   label: "网格区块(saas)", |   label: "网格区块", | ||||||
|  |  | ||||||
|   props: { |   props: { | ||||||
|     instance: Function, |     instance: Function, | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ import List from "./components/list"; | |||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   name: "AppGridMap", |   name: "AppGridMap", | ||||||
|   label: "网格地图(saas)", |   label: "网格地图", | ||||||
|  |  | ||||||
|   props: { |   props: { | ||||||
|     instance: Function, |     instance: Function, | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ import Family from "./components/Family"; | |||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   name: "AppGridMember", |   name: "AppGridMember", | ||||||
|   label: "网格管理员(saas)", |   label: "网格管理员", | ||||||
|   props: { |   props: { | ||||||
|     instance: Function, |     instance: Function, | ||||||
|     dict: Object, |     dict: Object, | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
|     <meta http-equiv="X-UA-Compatible" content="IE=edge"> |     <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||||||
|     <meta name="viewport" content="width=device-width,initial-scale=1.0"> |     <meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||||||
|     <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |     <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||||||
|     <title>村务云应用库-展示页面</title> |     <title>web端应用库-展示页面</title> | ||||||
|     <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js" referrerpolicy="origin"></script> |     <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js" referrerpolicy="origin"></script> | ||||||
|     <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js" referrerpolicy="origin"></script> |     <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js" referrerpolicy="origin"></script> | ||||||
|   </head> |   </head> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user