Skip to content

Commit

Permalink
更新项目
Browse files Browse the repository at this point in the history
  • Loading branch information
sugars committed Aug 31, 2017
1 parent 11e4f9e commit be64413
Show file tree
Hide file tree
Showing 33 changed files with 4,724 additions and 260 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

> 持续更新中...
> 2017.8.31更新内容:
1.名片分组
2.删除名片功能
3.快捷拨打电话
4.识别名片
5.将名片保存于CRM系统
6.查看名片详情
7.编辑名片信息可更新
8.可查看公司工商信息



## 技术栈

* vue-cli: 快速构建vue单页应用的脚手架
Expand Down
10 changes: 9 additions & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ module.exports = {
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
proxyTable: {
// '/api': {
// target: 'http://v.juhe.cn/youshu',
// changeOrigin: true,
// pathRewrite: {
// '^/api': ''
// }
// }
},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
Expand Down
7 changes: 2 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>Vue+MuseUI+Node</title>
<title></title>
<meta name="screen-orientation" content="portrait">
<meta name="full-screen" content="yes">
<meta name="browsermode" content="application">
Expand All @@ -12,10 +12,7 @@
<meta name="viewport"
content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,minimal-ui">
<!--以下两个链接是框架字体相关的-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!--<link rel="stylesheet" href="static/css/css.css">-->
<!--<link rel="stylesheet" href="static/css/icon.css">-->
<link rel="stylesheet" href="static/iconfont/material-icons.css">
<script src="static/js/jquery-1.9.1.min.js"></script>
<script src="static/js/Base.js"></script>
<script src="static/js/dynamictk.js"></script>
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
},
"dependencies": {
"axios": "^0.16.2",
"exif-js": "^2.2.1",
"fastclick": "^1.0.6",
"jsonp": "^0.2.1",
"material-design-icons": "^3.0.1",
"mint-ui": "^2.2.9",
"muse-ui": "^2.0.3",
"pinyin": "^2.8.3",
Expand Down
20 changes: 20 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<div class="patch"></div>
</div>

<mu-toast v-if="toast" :message="toastMsg"></mu-toast>

<!--底部tabs-->
<div class="container-bottom">
<bottom-tab class="tab"></bottom-tab>
Expand All @@ -30,11 +32,18 @@
components: {
topNav,
bottomTab
},
computed: {
...mapState(['toast', 'toastMsg'])
}
}
</script>

<style lang="scss">
html, body {
}
#app {
.container-top {
position: fixed;
Expand Down Expand Up @@ -67,6 +76,17 @@
/*background-color: #fff;*/
}
}
.mu-toast {
left: 50%;
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
-ms-transform: translateX(-50%);
-o-transform: translateX(-50%);
transform: translateX(-50%);
bottom: 15%;
width: auto !important;
}
}
ul, ol {
Expand Down
35 changes: 35 additions & 0 deletions src/common/js/BSKEY.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* Created by Sugar on 2017/8/29.
*/
export default {
// new_enterprisename: "企业名称",
new_frname: "法定代表人",
new_regno: "工商注册号",
new_creditcode: "统一社会信用代码",
new_regcap: "注册资金(单位:万元)",
new_regcapcur: "注册币种",
new_esdate: "开业日期",
new_openfrom: "经营期限自",
new_opento: "经营期限至",
new_enterprisetype: "企业(机构)类型",
new_enterprisestatus: "经营状态",
new_canceldate: "注销日期",
new_revokedate: "吊销日期",
new_address: "注册地址",
new_abuitem: "许可经营项目",
new_cbuitem: "一般经营项目",
new_operatescope: "经营(业务)范围",
new_operatescopeandform: "经营(业务)范围及方式",
//icon
new_name: "名字-person-text",
new_mobile: "手机-phone_iphone-number",
new_tel: "电话-call-tel",
new_post: "邮编-markunread_mailbox-number",
new_web: "网址-web-text",
new_fax: "传真-local_printshop-text",
new_email: "邮箱-email-email",
new_dept: "职位-perm_contact_calendar-text",
new_comp: "公司-domain-text",
new_addr: "地址-place-text",
// new_title: "图片地址"
}
101 changes: 101 additions & 0 deletions src/components/business/businessdata.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<template>
<div class="bcdata-box">
<div style="width:100%;background-color:#fff;margin-top: 50%;text-align: center;"
v-if="isAjax">
<mu-circular-progress :size="40" :color="'474a4f'" :strokeWidth="5"/>
</div>

<div v-if="compayBusinessData.length>0" style="text-align:center;">
<mu-row :gutter="true">
<mu-col v-for="(val,key) in getBSTitle"
:key="key" :width="key=='经营(业务)范围'?'100':'50'">
<mu-list-item
disableRipple>
<mu-text-field :label="key" type="text"
:value="val"
multiLine
:rowsMax="10"
:fullWidth="true"
:labelClass="'labelClass'"
:underlineClass="'txtline'"
:inputClass="'inputClass'"
:iconClass="'error'"
:underlineShow="true"
:disabled="true"></mu-text-field>
</mu-list-item>
</mu-col>
</mu-row>

<mu-raised-button label="返回" class="demo-raised-button" @click="backDetails"></mu-raised-button>
</div>

<div class="empty" v-if="compayBusinessData.length==0&&!isAjax">
<mu-icon value="sentiment_neutral" :size="80"></mu-icon>
<mu-content-block :style="{'margin-bottom':'20px'}">查无此公司的工商信息</mu-content-block>
<mu-raised-button label="返回" class="demo-raised-button" @click="backDetails"></mu-raised-button>
</div>
</div>
</template>
<style lang="scss">
.bcdata-box {
position: relative;
width: 100%;
height: 100%;
padding: 15px;
background-color: #fff;
.mu-item {
padding: 0 !important;
}
.empty {
text-align: center;
margin-top: 50%;
}
.labelClass {
color: #9e9e9e;
font-weight: bold;
}
.inputClass {
color: #000 !important;
font-weight: bold !important;
opacity: 1;
}
.txtline {
/*background-color: orange !important;*/
border: 1px solid #edeff2 !important;
}
.mu-text-field.has-label {
min-height: 60px !important;
}
}
</style>
<script>
import {mapState, mapGetters} from 'vuex'
import bskey from '../../common/js/BSKEY'
export default {
name: 'businessData',
data() {
return {
BSKEY: bskey
}
},
computed: {
...mapState(['isAjax', 'compayBusinessData']),
...mapGetters(['getBSTitle'])
},
created() {
// this.$store.state.isAjax = true
// this.$store.dispatch('getBusinessDataByCRM', this.$route.query)
},
methods: {
backDetails() {
this.$router.back();
}
}
}
</script>
26 changes: 20 additions & 6 deletions src/components/common/businesscard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
</mu-list-item>

<div class="card-menu">
<mu-icon-menu slot="right" icon="more_vert" tooltip="操作">
<mu-menu-item title="电话"/>
<mu-menu-item title="同步联系人"/>
<mu-menu-item title="分组"/>
<mu-menu-item title="删除"/>
<mu-icon-menu v-show="!isAjax" slot="right" icon="more_vert" tooltip="操作">
<!--<mu-menu-item title="电话" tag :href="item.new_mobile?'tel:'+item.new_mobile:'javascript:;'"></mu-menu-item>-->
<mu-menu-item title="电话" @click="callTel(item.new_mobile)"></mu-menu-item>
<!--<mu-menu-item title="同步联系人"></mu-menu-item>-->
<!--<mu-menu-item title="分组"></mu-menu-item>-->
<mu-menu-item title="删除" @click.stop="del(item.new_cardid)"></mu-menu-item>
</mu-icon-menu>
</div>

Expand Down Expand Up @@ -48,7 +49,7 @@
</style>

<script>
import {mapMutations} from 'vuex'
import {mapState, mapMutations} from 'vuex'
export default {
name: 'businessCard',
Expand All @@ -61,12 +62,25 @@
data() {
return {}
},
computed: {
...mapState(['isAjax'])
},
methods: {
...mapMutations(['getActiveId', 'viewDetail']),
showDetails(id) {
this.viewDetail()
this.getActiveId({activeId: id})
this.$router.push({path: 'details', query: {id: id}})
},
callTel(phone) {
if (phone && phone.length > 0) {
window.location.href = "tel:" + phone
} else {
this.$store.commit('showToast', {msg: '请先为此名片填写电话'})
}
},
del(id) {
this.$parent.$parent.showDel(id)
}
}
}
Expand Down
Loading

0 comments on commit be64413

Please sign in to comment.