Commit 02ee7a25 authored by denghr's avatar denghr

公众号页面

parent 3a99d8d0
......@@ -2819,6 +2819,15 @@
}
}
},
"dom7": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.3.tgz",
"integrity": "sha512-QTxHHDox+M6ZFz1zHPAHZKI3JOHY5iY4i9BK2uctlggxKQwRhO3q3HHFq1BKsT25Bm/ySSj70K6Wk/G4bs9rMQ==",
"dev": true,
"requires": {
"ssr-window": "^1.0.1"
}
},
"domain-browser": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz",
......@@ -3902,7 +3911,8 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.1.1",
......@@ -3961,7 +3971,8 @@
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
"integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=",
"dev": true
"dev": true,
"optional": true
},
"bcrypt-pbkdf": {
"version": "1.0.1",
......@@ -3978,6 +3989,7 @@
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
"integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
"dev": true,
"optional": true,
"requires": {
"inherits": "~2.0.0"
}
......@@ -3987,6 +3999,7 @@
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"dev": true,
"optional": true,
"requires": {
"hoek": "2.x.x"
}
......@@ -3996,6 +4009,7 @@
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz",
"integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=",
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^0.4.1",
"concat-map": "0.0.1"
......@@ -4005,7 +4019,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
"integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=",
"dev": true
"dev": true,
"optional": true
},
"caseless": {
"version": "0.12.0",
......@@ -4025,7 +4040,8 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
"dev": true,
"optional": true
},
"combined-stream": {
"version": "1.0.5",
......@@ -4041,19 +4057,22 @@
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
"dev": true,
"optional": true
},
"cryptiles": {
"version": "2.0.5",
......@@ -4136,7 +4155,8 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz",
"integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=",
"dev": true
"dev": true,
"optional": true
},
"forever-agent": {
"version": "0.6.1",
......@@ -4161,13 +4181,15 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
"dev": true,
"optional": true
},
"fstream": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
"integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
......@@ -4228,6 +4250,7 @@
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"optional": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
......@@ -4241,7 +4264,8 @@
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
"dev": true
"dev": true,
"optional": true
},
"har-schema": {
"version": "1.0.5",
......@@ -4285,7 +4309,8 @@
"version": "2.16.3",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
"dev": true
"dev": true,
"optional": true
},
"http-signature": {
"version": "1.1.1",
......@@ -4304,6 +4329,7 @@
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"optional": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
......@@ -4313,7 +4339,8 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.4",
......@@ -4327,6 +4354,7 @@
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "1.0.1"
}
......@@ -4342,7 +4370,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
"dev": true,
"optional": true
},
"isstream": {
"version": "0.1.2",
......@@ -4443,6 +4472,7 @@
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "1.1.7"
}
......@@ -4451,13 +4481,15 @@
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
"dev": true,
"optional": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -4537,6 +4569,7 @@
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -4570,7 +4603,8 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
"dev": true,
"optional": true
},
"performance-now": {
"version": "0.2.0",
......@@ -4583,7 +4617,8 @@
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
"dev": true
"dev": true,
"optional": true
},
"punycode": {
"version": "1.4.1",
......@@ -4626,6 +4661,7 @@
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz",
"integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=",
"dev": true,
"optional": true,
"requires": {
"buffer-shims": "~1.0.0",
"core-util-is": "~1.0.0",
......@@ -4672,6 +4708,7 @@
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
"integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
"dev": true,
"optional": true,
"requires": {
"glob": "^7.0.5"
}
......@@ -4680,7 +4717,8 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
"integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
"dev": true
"dev": true,
"optional": true
},
"semver": {
"version": "5.3.0",
......@@ -4745,6 +4783,7 @@
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -4756,6 +4795,7 @@
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
"integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.0.1"
}
......@@ -4772,6 +4812,7 @@
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -4788,6 +4829,7 @@
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
"dev": true,
"optional": true,
"requires": {
"block-stream": "*",
"fstream": "^1.0.2",
......@@ -4849,7 +4891,8 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
"dev": true,
"optional": true
},
"uuid": {
"version": "3.0.1",
......@@ -4882,7 +4925,8 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
"dev": true,
"optional": true
}
}
},
......@@ -10516,6 +10560,12 @@
"tweetnacl": "~0.14.0"
}
},
"ssr-window": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz",
"integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg==",
"dev": true
},
"stackframe": {
"version": "1.0.4",
"resolved": "https://registry.npm.taobao.org/stackframe/download/stackframe-1.0.4.tgz",
......@@ -10709,6 +10759,16 @@
}
}
},
"swiper": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/swiper/-/swiper-4.5.0.tgz",
"integrity": "sha512-jRCd/CGet9kaHwthHdd/sL/YU8CI157PWLyItnIcn/o/jP4haVky3zTF6f9F3JDpmQIw7jdWihISiYx0/oTHsg==",
"dev": true,
"requires": {
"dom7": "^2.1.3",
"ssr-window": "^1.0.1"
}
},
"table": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz",
......
......@@ -31,12 +31,10 @@
margin: 0 88px;
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;white-space: nowrap;text-overflow:ellipsis;word-wrap:break-word;word-break:break-all;
}
.ellipsis2{
width: 200px;
// width: 200px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
......@@ -82,4 +80,7 @@ input::-webkit-inner-spin-button {
input[type="number"]{
-moz-appearance: textfield;
}
.swiper-pagination-bullet-active{background-color: #C1A170 !important;}
.swiper-pagination-bullet{background: #fff;}
.swiper-pagination-fraction, .swiper-pagination-custom, .swiper-container-horizontal > .swiper-pagination-bullets{bottom: 20px;}
</style>
......@@ -12,9 +12,9 @@ export function page(query) {
export function allPage(query) {
return fetch({
url: '/vehicle/branchCompany/allPage',
method: 'get',
params: query
url: '/vehicle/branchCompany/app/unauth/companys',
method: 'post',
data: query
});
}
......@@ -37,7 +37,7 @@ export function addObj(obj) {
// 股权价格
export function getAllStockPrice() {
return fetch({
url: '/vehicle/branchCompany/stock/allPrice',
url: '/vehicle/branchCompany/stock/right/app/unauth/stock_right_price',
method: 'get'
});
}
......@@ -45,7 +45,7 @@ export function getAllStockPrice() {
// 我要参与-众筹
export function stockApply(obj) {
return fetch({
url: 'vehicle/branchCompany/stock/apply',
url: '/vehicle/branchCompany/stock/right/app/unauth/apply',
method: 'post',
data: obj
});
......@@ -53,9 +53,9 @@ export function stockApply(obj) {
// 股权列表
export function stockSearchPage(query) {
return fetch({
url: '/vehicle/branchCompany/stock/search',
method: 'get',
params: query
url: '/vehicle/branchCompany/stock/right/app/unauth/webchat_office/stockrights',
method: 'post',
data: query
});
}
......@@ -82,6 +82,12 @@ export function getAll() {
})
}
export function getDetail(id) {
return fetch({
url: '/vehicle/company_base/app/unauth/detail/'+id,
method: 'get'
})
}
/**
* 获取所有公司信息
* @returns {null|*}
......@@ -99,3 +105,4 @@ export function getAllCompany(resolve) {
resolve(codeAndBranchCompany);
});
}
......@@ -12,9 +12,9 @@ export function page(query) {
export function allPage(query) {
return fetch({
url: '/vehicle/campsite/allPage',
method: 'get',
params: query
url: '/api/campsite/campsiteShop/app/unauth/webchat_official/campsites',
method: 'POST',
data: query
});
}
......
......@@ -120,5 +120,4 @@ export function getRegionByCodes(codes) {
store.dispatch("cacheRegion", regions);
}
return regions;
}
}
\ No newline at end of file
......@@ -17,7 +17,7 @@ export function page(param) {
export function search(param) {
return fetch({
url: '/vehicle/branchCompany/stock/search',
url: '/vehicle/branchCompany/stock/right/search',
method: 'get',
params: param
});
......@@ -25,15 +25,15 @@ export function search(param) {
export function addObj(param) {
return fetch({
url: '/vehicle/branchCompany/stock',
method: 'put',
url: '/vehicle/branchCompany/stock/right/addStockInfo',
method: 'post',
data: param
});
}
export function updateObj(param) {
return fetch({
url: '/vehicle/branchCompany/stock',
url: '/vehicle/branchCompany/stock/right/updStockInfo',
method: 'post',
data: param
});
......@@ -41,7 +41,7 @@ export function updateObj(param) {
export function delObj(id) {
return fetch({
url: '/vehicle/branchCompany/stock/' + id,
url: '/vehicle/branchCompany/stock/right/' + id,
method: 'delete'
});
}
<template>
<div class="address" id="address">
<div class="addressboxbg" @click="cancel"></div>
<div class="addressbox">
<p style="padding:15px 0;text-align:center;color:#333333;font-size:16px;margin:0;border-bottom:1px solid #eee">选择省/城市</p>
<div class="addressSelect" >
<div class="selectbox"></div>
<ul @touchstart="touchStart($event,'province')" @touchmove="touchMove($event,'province')" @touchend="touchEnd($event,'province')" :style="provinceStyle" :class="[{'selectAni':addSelect}]">
<li v-for="(item,index) in list" :class="[{'addSelectActive':index == provinceIndex}]" :key="index">{{item.name}}</li>
</ul>
<ul @touchstart="touchStart($event,'city')" @touchmove="touchMove($event,'city')" @touchend="touchEnd($event,'city')" :style="cityStyle" :class="[{'selectAni':addSelect}]">
<li v-for="(item,index) in list2" :class="[{'addSelectActive':index == cityIndex}]" :key="index">{{item.name}}</li>
</ul>
<!-- <ul @touchstart="touchStart($event,'district')" @touchmove="touchMove($event,'district')" @touchend="touchEnd($event,'district')" :style="districtStyle" :class="[{'selectAni':addSelect}]">
<li v-for="(item,index) in list3" :class="[{'addSelectActive':index == districtIndex}]" :key="index" >{{item.name}}</li>
</ul> -->
</div>
<p class="text_btn" @click="complete">确 定</p>
</div>
</div>
</template>
<script>
import {
getSonRegionByCodes,
getRegionByCodes,
} from 'api/base_info/region/';
export default {
props: ["addressShow"],
data () {
return {
list: [
{
name:'全部',
provinceId:undefined
}
],
list2: [
{
name:'全部',
cityId:undefined
}
],
list3: [],
provinceStyle: {
WebkitTransform: 'translate3d(0px,0px,0px)'
},
cityStyle: {
WebkitTransform: 'translate3d(0px,0px,0px)'
},
districtStyle: {
WebkitTransform: 'translate3d(0px,0px,0px)'
},
startTop: 0,
provinceIndex: 0,
cityIndex: 0,
districtIndex: 0,
translateY: 0,
maxScroll: 0,
addHeight: 0,
addSelect: false,
provinceVal: '',
cityVal: '',
areaVal: '',
val: {
'provinceName': '省',
'provinceId': undefined,
'cityName': '市',
'cityId':undefined
},
}
},
watch: {
// addressShow(newValue, oldValue){
// if(!newValue){
// this.$emit("cancel", false);
// }
// },
// 监听省滑动
provinceVal (value) {
this.$axiosGet(this.$api.area, {parentId: value}).then((res) => {
if (res.code === 1) {
this.list2 = res.data.length > 1 ? res.data : [{name: '-'}]
if (res.data.length < 1) {
this.list3 = [{name: '-'}]
}
this.cityVal = this.list2[0].value
}
})
},
// 监听市滑动
cityVal (value) {
if (value) {
this.$axiosGet(this.$api.area, {parentId: value}).then((res) => {
if (res.code === 1) {
this.list3 = res.data.length > 1 ? res.data : [{name: '-'}]
}
})
}
}
},
created () {
// 初始化数据
// 拿省的数据
this.list = this.list.concat(getSonRegionByCodes(1));
// 拿市区的数据
// this.list2 = this.list2.concat(getSonRegionByCodes(110000));
},
methods: {
// 点击取消
cancel () {
this.$emit('cancel', false)
},
// 点击完成
complete () {
this.$emit('complete', this.val)
},
// 滑动开始
touchStart (e, val) {
e.preventDefault()
this.addSelect = false
this.addHeight = e.currentTarget.children[0].offsetHeight
this.maxScroll = this.addHeight * e.currentTarget.children.length
this.startTop = e.targetTouches[0].pageY
switch (val) {
case 'province':
this.translateY = parseInt(this.provinceStyle.WebkitTransform.slice(this.provinceStyle.WebkitTransform.indexOf(',') + 1, this.provinceStyle.WebkitTransform.lastIndexOf(',')))
break
case 'city':
this.translateY = parseInt(this.cityStyle.WebkitTransform.slice(this.cityStyle.WebkitTransform.indexOf(',') + 1, this.cityStyle.WebkitTransform.lastIndexOf(',')))
break
case 'district':
this.translateY = parseInt(this.districtStyle.WebkitTransform.slice(this.districtStyle.WebkitTransform.indexOf(',') + 1, this.districtStyle.WebkitTransform.lastIndexOf(',')))
break
default:
break
}
},
// 滑动进行中
touchMove (e, val) {
e.preventDefault()
switch (val) {
case 'province':
if ((e.targetTouches[0].pageY - this.startTop + this.translateY) > 0) {
this.provinceStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
} else if ((e.targetTouches[0].pageY - this.startTop + this.translateY) < -(this.maxScroll - this.addHeight)) {
this.provinceStyle.WebkitTransform = 'translate3d(0px,' + -(this.maxScroll - this.addHeight) + 'px,0px)'
} else {
this.provinceStyle.WebkitTransform = 'translate3d(0px,' + (e.targetTouches[0].pageY - this.startTop + this.translateY) + 'px,0px)'
}
break
case 'city':
if ((e.targetTouches[0].pageY - this.startTop + this.translateY) > 0) {
this.cityStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
} else if ((e.targetTouches[0].pageY - this.startTop + this.translateY) < -(this.maxScroll - this.addHeight)) {
this.cityStyle.WebkitTransform = 'translate3d(0px,' + -(this.maxScroll - this.addHeight) + 'px,0px)'
} else {
this.cityStyle.WebkitTransform = 'translate3d(0px,' + (e.targetTouches[0].pageY - this.startTop + this.translateY) + 'px,0px)'
}
break
case 'district':
if ((e.targetTouches[0].pageY - this.startTop + this.translateY) > 0) {
this.districtStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
} else if ((e.targetTouches[0].pageY - this.startTop + this.translateY) < -(this.maxScroll - this.addHeight)) {
this.districtStyle.WebkitTransform = 'translate3d(0px,' + -(this.maxScroll - this.addHeight) + 'px,0px)'
} else {
this.districtStyle.WebkitTransform = 'translate3d(0px,' + (e.targetTouches[0].pageY - this.startTop + this.translateY) + 'px,0px)'
}
break
default:
break
}
},
// 滑动结束
touchEnd (e, val) {
e.preventDefault()
this.addSelect = true
switch (val) {
case 'province':
let provinceTranslateY = parseInt(this.provinceStyle.WebkitTransform.slice(this.provinceStyle.WebkitTransform.indexOf(',') + 1, this.provinceStyle.WebkitTransform.lastIndexOf(',')))
this.provinceIndex = -Math.round(provinceTranslateY / this.addHeight)
this.provinceStyle.WebkitTransform = 'translate3d(0px,' + (Math.round(provinceTranslateY / this.addHeight) * this.addHeight) + 'px,0px)'
this.cityStyle.WebkitTransform = this.districtStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
this.cityIndex = this.districtIndex = 0
break
case 'city':
let cityTranslateY = parseInt(this.cityStyle.WebkitTransform.slice(this.cityStyle.WebkitTransform.indexOf(',') + 1, this.cityStyle.WebkitTransform.lastIndexOf(',')))
this.cityIndex = -Math.round(cityTranslateY / this.addHeight)
this.cityStyle.WebkitTransform = 'translate3d(0px,' + (Math.round(cityTranslateY / this.addHeight) * this.addHeight) + 'px,0px)'
this.districtStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
this.districtIndex = 0
break
case 'district':
let districtTranslateY = parseInt(this.districtStyle.WebkitTransform.slice(this.districtStyle.WebkitTransform.indexOf(',') + 1, this.districtStyle.WebkitTransform.lastIndexOf(',')))
this.districtIndex = -Math.round(districtTranslateY / this.addHeight)
this.districtStyle.WebkitTransform = 'translate3d(0px,' + (Math.round(districtTranslateY / this.addHeight) * this.addHeight) + 'px,0px)'
break
default:
break
}
// 滑动结束后 处理数据
this.dataProcessing()
},
// 数据处理
dataProcessing () {
//更新城市数据
if(this.list[this.provinceIndex].id==undefined){
this.list2 = [
{
name:'全部',
cityId:undefined
}
]
}else{
this.list2 = [
{
name:'全部',
cityId:undefined
}
]
this.list2 = this.list2.concat(getSonRegionByCodes(this.list[this.provinceIndex].id))
}
// 滑动数据传输 数据处理
this.val.provinceName = this.list[this.provinceIndex].name
this.val.provinceId = this.list[this.provinceIndex].id
this.val.cityName = this.list2[this.cityIndex].name
this.val.cityId = this.list2[this.cityIndex].id
console.log(this.val)
}
}
}
</script>
<style scoped>
.address{
position:absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
.address .addressbox{
height: 40%;
position: fixed;
z-index: 101;
width: 100%;
max-height: 100%;
overflow: hidden;
background: #fff;
bottom: 0px;
border-radius: 5px 5px 0 0
}
.address .addressbox .text_btn{
height: 40px;
font-size: 14px;
color: #fff;
line-height: 40px;
text-align: center;
background: #C1A170;
margin: 0;
position: absolute;
width: 100%;
bottom: 0px;
}
.addressSelect .selectbox{
width: 100%;
height: 32px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
margin-top: 60px;
background: #F8F8F8;
}
.address .addressboxbg{
position: fixed;
left: 0;
top: 0;
z-index: 100;
width: 100%;
height: 100%;
background: rgba(0,0,0,.7);
}
.addressSelect{width: 100%;height: 235px;position: relative; background: #fff;overflow: hidden; -webkit-mask-box-image: linear-gradient(0deg,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent); font-size: 14px;}
.addressSelect ul{margin-top: 0;width: 50%; position: absolute; left: 0; top:60px; -webkit-transform-style: preserve-3d; -webkit-backface-visibility:hidden; text-align: center; padding-left: 0;}
.addressSelect ul li{white-space : nowrap;overflow: hidden; text-overflow:ellipsis; color:#666; padding: 5px 0;font-size: 13px}
.addressSelect ul:nth-of-type(2){left: 50%;}
.addressSelect ul:nth-of-type(3){left: 66.666666%;}
.addressSelect ul li.addSelectActive{color:#171413; transform: scale(1.1); transition: 0.5s;font-size: 15px}
.selectAni{transition: 0.8s;}
</style>
\ No newline at end of file
<template>
<div class="address" id="address">
<div class="addressboxbg" @click="cancel"></div>
<div class="addressbox">
<p style="padding:15px 0;text-align:center;color:#333333;font-size:16px;margin:0;border-bottom:1px solid #eee">选择股价</p>
<div class="addressSelect" >
<div class="selectbox"></div>
<ul @touchstart="touchStart($event,'province')" @touchmove="touchMove($event,'province')" @touchend="touchEnd($event,'province')" :style="provinceStyle" :class="[{'selectAni':addSelect}]">
<li v-for="(item,index) in list" :class="[{'addSelectActive':index == provinceIndex}]" :key="index">{{item}}</li>
</ul>
<!-- <ul @touchstart="touchStart($event,'city')" @touchmove="touchMove($event,'city')" @touchend="touchEnd($event,'city')" :style="cityStyle" :class="[{'selectAni':addSelect}]">
<li v-for="(item,index) in list2" :class="[{'addSelectActive':index == cityIndex}]" :key="index">{{item.name}}</li>
</ul> -->
<!-- <ul @touchstart="touchStart($event,'district')" @touchmove="touchMove($event,'district')" @touchend="touchEnd($event,'district')" :style="districtStyle" :class="[{'selectAni':addSelect}]">
<li v-for="(item,index) in list3" :class="[{'addSelectActive':index == districtIndex}]" :key="index" >{{item.name}}</li>
</ul> -->
</div>
<p class="text_btn" @click="complete">确 定</p>
</div>
</div>
</template>
<script>
import {
getAllStockPrice
} from 'api/base_info/branch_company';
export default {
props: ["addressShow"],
data () {
return {
list: ['全部'],
provinceStyle: {
WebkitTransform: 'translate3d(0px,0px,0px)'
},
cityStyle: {
WebkitTransform: 'translate3d(0px,0px,0px)'
},
districtStyle: {
WebkitTransform: 'translate3d(0px,0px,0px)'
},
startTop: 0,
provinceIndex: 0,
cityIndex: 0,
districtIndex: 0,
translateY: 0,
maxScroll: 0,
addHeight: 0,
addSelect: false,
provinceVal: '',
cityVal: '',
areaVal: '',
priceStart:undefined
}
},
watch: {
// addressShow(newValue, oldValue){
// if(!newValue){
// this.$emit("cancel", false);
// }
// },
// 监听省滑动
provinceVal (value) {
this.$axiosGet(this.$api.area, {parentId: value}).then((res) => {
if (res.code === 1) {
this.list2 = res.data.length > 1 ? res.data : [{name: '-'}]
if (res.data.length < 1) {
this.list3 = [{name: '-'}]
}
this.cityVal = this.list2[0].value
}
})
},
// 监听市滑动
cityVal (value) {
if (value) {
this.$axiosGet(this.$api.area, {parentId: value}).then((res) => {
if (res.code === 1) {
this.list3 = res.data.length > 1 ? res.data : [{name: '-'}]
}
})
}
}
},
created () {
// 初始化数据
// 拿股价数据
this.getAllStockPrice()
},
methods: {
//获取股价列表
getAllStockPrice() {
var that = this;
getAllStockPrice().then(response => {
let arr = [];
response.data.map(function(item){
item = item+"万";
arr.push(item);
});
that.list = this.list.concat(arr);
});
},
// 点击取消
cancel () {
this.$emit('pricePickcancel', false)
},
// 点击完成
complete () {
if(this.priceStart=='全部'){
this.priceStart==undefined
}
console.log(this.priceStart)
this.$emit('pricePickcomplete', this.priceStart)
},
// 滑动开始
touchStart (e, val) {
e.preventDefault()
this.addSelect = false
this.addHeight = e.currentTarget.children[0].offsetHeight
this.maxScroll = this.addHeight * e.currentTarget.children.length
this.startTop = e.targetTouches[0].pageY
switch (val) {
case 'province':
this.translateY = parseInt(this.provinceStyle.WebkitTransform.slice(this.provinceStyle.WebkitTransform.indexOf(',') + 1, this.provinceStyle.WebkitTransform.lastIndexOf(',')))
break
case 'city':
this.translateY = parseInt(this.cityStyle.WebkitTransform.slice(this.cityStyle.WebkitTransform.indexOf(',') + 1, this.cityStyle.WebkitTransform.lastIndexOf(',')))
break
case 'district':
this.translateY = parseInt(this.districtStyle.WebkitTransform.slice(this.districtStyle.WebkitTransform.indexOf(',') + 1, this.districtStyle.WebkitTransform.lastIndexOf(',')))
break
default:
break
}
},
// 滑动进行中
touchMove (e, val) {
e.preventDefault()
switch (val) {
case 'province':
if ((e.targetTouches[0].pageY - this.startTop + this.translateY) > 0) {
this.provinceStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
} else if ((e.targetTouches[0].pageY - this.startTop + this.translateY) < -(this.maxScroll - this.addHeight)) {
this.provinceStyle.WebkitTransform = 'translate3d(0px,' + -(this.maxScroll - this.addHeight) + 'px,0px)'
} else {
this.provinceStyle.WebkitTransform = 'translate3d(0px,' + (e.targetTouches[0].pageY - this.startTop + this.translateY) + 'px,0px)'
}
break
case 'city':
if ((e.targetTouches[0].pageY - this.startTop + this.translateY) > 0) {
this.cityStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
} else if ((e.targetTouches[0].pageY - this.startTop + this.translateY) < -(this.maxScroll - this.addHeight)) {
this.cityStyle.WebkitTransform = 'translate3d(0px,' + -(this.maxScroll - this.addHeight) + 'px,0px)'
} else {
this.cityStyle.WebkitTransform = 'translate3d(0px,' + (e.targetTouches[0].pageY - this.startTop + this.translateY) + 'px,0px)'
}
break
case 'district':
if ((e.targetTouches[0].pageY - this.startTop + this.translateY) > 0) {
this.districtStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
} else if ((e.targetTouches[0].pageY - this.startTop + this.translateY) < -(this.maxScroll - this.addHeight)) {
this.districtStyle.WebkitTransform = 'translate3d(0px,' + -(this.maxScroll - this.addHeight) + 'px,0px)'
} else {
this.districtStyle.WebkitTransform = 'translate3d(0px,' + (e.targetTouches[0].pageY - this.startTop + this.translateY) + 'px,0px)'
}
break
default:
break
}
},
// 滑动结束
touchEnd (e, val) {
e.preventDefault()
this.addSelect = true
switch (val) {
case 'province':
let provinceTranslateY = parseInt(this.provinceStyle.WebkitTransform.slice(this.provinceStyle.WebkitTransform.indexOf(',') + 1, this.provinceStyle.WebkitTransform.lastIndexOf(',')))
this.provinceIndex = -Math.round(provinceTranslateY / this.addHeight)
this.provinceStyle.WebkitTransform = 'translate3d(0px,' + (Math.round(provinceTranslateY / this.addHeight) * this.addHeight) + 'px,0px)'
this.cityStyle.WebkitTransform = this.districtStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
this.cityIndex = this.districtIndex = 0
break
case 'city':
let cityTranslateY = parseInt(this.cityStyle.WebkitTransform.slice(this.cityStyle.WebkitTransform.indexOf(',') + 1, this.cityStyle.WebkitTransform.lastIndexOf(',')))
this.cityIndex = -Math.round(cityTranslateY / this.addHeight)
this.cityStyle.WebkitTransform = 'translate3d(0px,' + (Math.round(cityTranslateY / this.addHeight) * this.addHeight) + 'px,0px)'
this.districtStyle.WebkitTransform = 'translate3d(0px,0px,0px)'
this.districtIndex = 0
break
case 'district':
let districtTranslateY = parseInt(this.districtStyle.WebkitTransform.slice(this.districtStyle.WebkitTransform.indexOf(',') + 1, this.districtStyle.WebkitTransform.lastIndexOf(',')))
this.districtIndex = -Math.round(districtTranslateY / this.addHeight)
this.districtStyle.WebkitTransform = 'translate3d(0px,' + (Math.round(districtTranslateY / this.addHeight) * this.addHeight) + 'px,0px)'
break
default:
break
}
// 滑动结束后 处理数据
this.dataProcessing()
},
// 数据处理
dataProcessing () {
// 滑动数据传输 数据处理
this.priceStart = this.list[this.provinceIndex]
}
}
}
</script>
<style scoped>
.address{
position:absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
.address .addressbox{
height: 40%;
position: fixed;
z-index: 101;
width: 100%;
max-height: 100%;
overflow: hidden;
background: #fff;
bottom: 0px;
border-radius: 5px 5px 0 0
}
.address .addressbox .text_btn{
height: 40px;
font-size: 14px;
color: #fff;
line-height: 40px;
text-align: center;
background: #C1A170;
margin: 0;
position: absolute;
width: 100%;
bottom: 0px;
}
.addressSelect .selectbox{
width: 100%;
height: 32px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
margin-top: 60px;
background: #F8F8F8;
}
.address .addressboxbg{
position: fixed;
left: 0;
top: 0;
z-index: 100;
width: 100%;
height: 100%;
background: rgba(0,0,0,.7);
}
.addressSelect{width: 100%;height: 235px;position: relative; background: #fff;overflow: hidden; -webkit-mask-box-image: linear-gradient(0deg,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent); font-size: 14px;}
.addressSelect ul{margin-top: 0;width: 100%; position: absolute; left: 0; top:60px; -webkit-transform-style: preserve-3d; -webkit-backface-visibility:hidden; text-align: center; padding-left: 0;}
.addressSelect ul li{white-space : nowrap;overflow: hidden; text-overflow:ellipsis; color:#666; padding: 5px 0;font-size: 13px}
.addressSelect ul:nth-of-type(2){left: 50%;}
.addressSelect ul:nth-of-type(3){left: 66.666666%;}
.addressSelect ul li.addSelectActive{color:#171413; transform: scale(1.1); transition: 0.5s;font-size: 15px}
.selectAni{transition: 0.8s;}
</style>
\ No newline at end of file
......@@ -14,6 +14,7 @@ import 'assets/iconfont/iconfont'; // iconfont 具体图标见https://github.com
import * as filters from './filters'; // 全局vue filter
import Multiselect from 'vue-multiselect';// 使用的一个多选框组件,element-ui的select不能满足所有需求
import 'vue-multiselect/dist/vue-multiselect.min.css';// 多选框组件css
import 'swiper/dist/css/swiper.css';//引入swiper样式
import Sticky from 'components/Sticky'; // 粘性header组件
import IconSvg from 'components/Icon-svg';// svg 组件
import vueWaves from './directive/waves';// 水波纹指令
......
......@@ -60,6 +60,13 @@ export const constantRouterMap = [{
hidden: true
// authority: 'companyInfo'
},
{
path: '/companyDetail',
component: _import('baseInfo/companyInfo/companyDetail'),
name: '公司详情',
hidden: true
// authority: 'companyInfo'
},
{
path: '/provinceMap',
component: _import('baseInfo/companyInfo/provinceMap'),
......
......@@ -6,45 +6,64 @@
<span class="header-title">营地列表</span>
</div>
<div class="main-container">
<div class="shoppings main-container">
<div class="filter-container" ref="filter-container">
<el-form :rules="rules4Query" ref="queryForm" style="display: flex;" :inline="inline" :model="listQuery">
<el-select class="filter-item" style="width: 45%" v-model="listQuery.addrProvince" placeholder="请选择省份(直辖市)" @change='getValue'>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="item in provinceRegions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select class="filter-item" style="width: 45%;margin-left: 10px;" v-model="listQuery.addrCity" placeholder="请选择城市" @change='getCompanyList'>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="item in cityRegions4Query" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form>
</div>
</div>
<!--营地分布图-->
<company-map v-on:headCallBack="headCall" v-if="toList" :toSonData="type" :provinceName="provinceName"></company-map>
<company-map v-on:headCallBack="headCall" v-on:getAddrCity="getAddrCity" v-if="toList" :toSonData="type" :provinceName="provinceName"></company-map>
<!--营地数据-->
<div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0">
<div class="shoppings company-list"
v-for="item in list"
:key="item.key"
>
<div class="item-right-p company-item">
<div class="ellipsis company-name">{{item.name}}</div>
<p class="ellipsis">负责人:{{item.leader}}</p>
<p>地址: {{item.address + item.addrDetail}}</p>
<p class="ellipsis">电话:{{item.leaderContactInfo}}</p>
</div>
<div style="border-radius:5px 5px 0 0;background: #fff;position: absolute;bottom: 0px;width:100%;">
<div style="text-align:center">
<img style="width: 10%;" :src="Height>=306?'../../../../static/images/top.png':'../../../../static/images/bottom.png'" alt="">
</div>
<infinite-loading v-show="loading" spinner="spiral" style="margin-top:2em" ref="sroller">
</infinite-loading>
<div v-if="nomore && !loading" style="text-align: center;color: #999;padding: 10px;">
---暂无更多数据---
<div class="moveBox" id="moveDiv" @mousedown="down" @touchstart="down" @mousemove="move" @touchmove="move" @mouseup="end" @touchend="end">
<div class="moveBoxLeft" v-if="!otherProvince">
<div class="moveBoxItem" :class="index==1?'active':''" @click="quanguo">全国<div class="bage" v-show="index==1"></div></div>
<div class="moveBoxItem" :class="index==2?'active':''" @click="currentProvince">当前省<div class="bage" v-show="index==2"></div></div>
<div class="moveBoxItem" :class="index==3?'active':''" @click="currentCity">当前市<div class="bage" v-show="index==3"></div></div>
</div>
<div style="color:#999;font-size:13px" v-if="!otherProvince" @click="showAddress">其他省市<span class="arrow-bottom"></span></div>
<div class="moveBoxLeft" v-if="otherProvince" style="justify-content: space-between;">
<div style="color:#171413;font-size:15px">{{provinceCity}}</div>
<img width="15" src="../../../../static/images/close.png" alt="" @click.stop="close">
</div>
</div>
<div v-if="toList && !loading && list.length == 0" style="text-align: center;color: #999;padding: 10px;">
---暂无数据---
<div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" :style="{ height: 'calc(100vh - '+Height+'px)'}" style="overflow:hidden;overflow-y:scroll;">
<div class="shoppings company-list" v-for="item in list" :key="item.key">
<div class="item-right-p company-item" @click="gotoDeatil(item)">
<img class="companyImg" :src="item.logo" alt="" srcset="">
<div class="companyInforBox">
<div class="company-name ellipsis2">{{item.name}}</div>
<div class="companyInfor">
<div class="companyInforLeft">
<div>总经理:{{item.concat}}</div>
<div>电话:{{item.phone}}</div>
</div>
<a :href="'tel:'+item.phone" class="companyInforRight">拨打电话</a>
</div>
</div>
</div>
<div class="addressBox">
<div class="addressLeft">
<img width="11" style="margin-right:5px" src="../../../../static/images/local.png" alt="" srcset="">
<div class="ellipsis" style="color:#666;font-size:11px;vertical-align: 2px;width:200px">{{item.address}}</div>
</div>
<div class="addressRight" @click="openAddress(item)">
<img width="15" src="../../../../static/images/go.png" alt="" srcset="">
<span style="color:#666;font-size:11px;padding-left:5px;vertical-align: 2px;">到这去</span>
</div>
</div>
</div>
<infinite-loading v-show="loading" spinner="spiral" style="margin-top:2em" ref="sroller">
</infinite-loading>
<div v-if="nomore && !loading" style="text-align: center;color: #999;padding: 10px;color:#999;font-size:12px">
没有更多啦~~
</div>
<div v-if="toList && !loading && list.length == 0" style="text-align: center;color: #999;padding: 10px;">
<img src="../../../../static/images/noThing.png" alt="" srcset="" style="width:50%">
<div style="color:#999;font-size:12px">当前地区暂无公司</div>
</div>
</div>
</div>
</div>
<Address v-on:cancel="cancel" v-on:complete="complete" v-if="addressShow"></Address>
</div>
</template>
<style>
......@@ -53,19 +72,35 @@
width: 100%;
}
.company-name{
font-size: 16px;
color: #333;
font-weight: 600;
font-size: 15px;
color: #171413;
font-weight: 500;
}
.company-item{
border-bottom: 1px solid #ccc;
padding: 5px 0;
.company-list{
border-bottom: 1px solid #EEEEEE;
}
.company-item p{
font-size: 13px;
color: #666;
padding-left: 0 !important;
.company-item{
padding: 15px 15px 0 15px;
display: flex;
display: -webkit-box;
display: -webkit-flex;
align-items: center;
}
.moveBoxItem{margin-right: 30px;position: relative;}
.bage{position: absolute;width: 18px;height: 3px;border-radius: 5px;background: #C1A170;left: 50%;transform: translateX(-50%);bottom: -5px}
.arrow-top{margin-left: 5px;vertical-align: 6px;font-size: 0;line-height: 0;border-width: 4px;border-color: #999;border-top-width: 0;border-style: dashed;border-bottom-style: solid;border-left-color: transparent;border-right-color: transparent;}
.arrow-bottom{margin-left: 5px;vertical-align: 2px;font-size: 0;line-height: 0;border-width: 4px;border-color: #999;border-bottom-width: 0;border-style: dashed;border-top-style: solid;border-left-color: transparent;border-right-color: transparent;}
.companyImg{width: 95px;height: 75px;border-radius: 5px;margin-right: 10px}
.companyInforBox{flex: 1;border-bottom: 1px solid #eee;display: flex;display: -webkit-box;display: -webkit-flex;flex-flow: column;}
.companyInfor{display: flex;display: -webkit-box;display: -webkit-flex;justify-content: space-between;align-items: center;margin: 10px 0;}
.companyInforLeft{flex:1;color: #666666;font-size: 12px}
.companyInforRight{height: 27px;border-radius: 15px;background: #D1B17E;color: #fff;font-size: 12px;line-height: 29px;padding: 0 15px}
.moveBox{width: 100%;padding: 20px 15px 5px 15px;display: flex;display: -webkit-box;display: -webkit-flex;justify-content: space-between;align-items: center;border-bottom: 1px solid #eee;}
.moveBoxLeft{flex: 1;display: flex;display: -webkit-box;display: -webkit-flex;font-size: 13px;color: #666;align-items: center}
.moveBoxLeft .active{font-size: 15px;color: #171413}
.addressBox{display: flex;justify-content: space-between;align-items: center;padding: 5px 15px}
.addressLeft{flex: 1;display: flex;}
/* .addressRight{display: flex;} */
</style>
<script>
......@@ -87,7 +122,7 @@
import infiniteScroll from 'vue-infinite-scroll'
import InfiniteLoading from 'vue-infinite-loading'
import Address from "../../../components/address/index.vue";
export default {
name: 'campsite',
directives: {
......@@ -96,9 +131,21 @@
components: {
BmMap,
InfiniteLoading,
companyMap},
companyMap,
Address},
data() {
return {
flags: false,
position: { x: 0, y: 0 },
nx: '', ny: '', dx: '', dy: '', xPum: '', yPum: '',
Height:406,
otherProvince:false,
provinceCity:'',
addrCity:undefined,
addrProvince:undefined,
addressShow:false,
index:1,
isCityActive:false,
type: "campsite",
toList: false,
nodata: false,
......@@ -240,9 +287,7 @@
}
},
created() {
this.branchCompany_btn_edit = this.elements['branchCompany:btn_edit'];
this.branchCompany_btn_del = this.elements['branchCompany:btn_del'];
this.branchCompany_btn_add = this.elements['branchCompany:btn_add'];
},
computed: {
...mapGetters([
......@@ -278,6 +323,86 @@
}
},
methods: {
gotoDeatil(item){
window.location.href='https://mgmt.dfangche.com/h5/appHtml/view/campsiteDetail.html?id='+item.id+'&longitude='+item.longitude+'&latitude='+item.latitude
},
openAddress(obj){
window.location.href='http://api.map.baidu.com/marker?location='+obj.latitude+','+obj.longitude+'&title='+obj.address+'&content='+obj.address+'&output=html&src=webapp.baidu.openAPIdemo'
},
down(){
this.flags = true;
var touch;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
this.position.x = touch.clientX;
this.position.y = touch.clientY;
this.dx = moveDiv.offsetLeft;
this.dy = moveDiv.offsetTop;
},
move(){
if(this.flags){
var touch ;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
this.nx = touch.clientX - this.position.x;
this.ny = touch.clientY - this.position.y;
this.xPum = this.dx+this.nx;
this.yPum = this.dy+this.ny;
this.Height = Number(this.Height) + Number(this.yPum)
// //阻止页面的滑动默认事件
document.addEventListener("touchmove",function(){ // 1.2 如果碰到滑动问题,请注意是否获取到 touchmove
// event.preventDefault();//jq 阻止冒泡事件
event.stopPropagation(); // 如果没有引入jq 就用 stopPropagation()
},false);
}
},
//鼠标释放时候的函数
end(){
this.flags = false;
},
close(){
this.otherProvince = false
},
quanguo(){
this.index=1
this.listQuery.addrProvince = undefined
this.listQuery.addrCity = undefined
this.getList();
},
currentProvince(){
this.index=2
this.listQuery.addrProvince = this.addrProvince
this.listQuery.addrCity = undefined
this.getList();
},
currentCity(){
this.index=3
this.listQuery.addrProvince = this.addrProvince
this.listQuery.addrCity = this.addrCity
this.getList();
},
showAddress(){
this.addressShow = true
},
cancel(){
this.addressShow = false
this.isCityActive = false
},
complete(e){
console.log(e)
this.provinceCity = e.provinceName+' - '+e.cityName
this.listQuery.addrProvince = e.provinceId
this.listQuery.addrCity = e.cityId
this.addressShow = false
this.otherProvince = true
this.getList();
},
getCompanyList(e){
let that = this;
this.provinceRegions.map(function(item){
......@@ -317,6 +442,10 @@
this.nomore = false;
this.loadMore();
},
getAddrCity(e){
this.addrCity = e
this.addrProvince = e.substr(0,2)+'0000'
},
/**
* 深拷贝
*/
......@@ -346,27 +475,29 @@
let allList = [];
let listTemp = res.data.data;
//一次读入所有涉及地区,防止多次读取
if (!this.$utils.isEmpty(listTemp)) {
let allRegions = new Set();
for (let index in listTemp) {
allRegions.add(listTemp[index].addrProvince);
allRegions.add(listTemp[index].addrCity);
allRegions.add(listTemp[index].addrTown);
let regions = getRegionByCodes([listTemp[index].addrProvince, listTemp[index].addrCity, listTemp[index].addrTown]);
listTemp[index].address = "";
for(let i = 0; i < regions.length; i++){
listTemp[index].address += regions[i].name + " ";
}
// listTemp[index].address = regions[0].name + ' ' + regions[1].name + ' ' + regions[2].name + ' ';
// if (!this.$utils.isEmpty(listTemp)) {
// let allRegions = new Set();
// for (let index in listTemp) {
// allRegions.add(listTemp[index].addrProvince);
// allRegions.add(listTemp[index].addrCity);
// allRegions.add(listTemp[index].addrTown);
// let regions = getRegionByCodes([listTemp[index].addrProvince, listTemp[index].addrCity, listTemp[index].addrTown]);
// // listTemp[index].address = "";
// for(let i = 0; i < regions.length; i++){
// listTemp[index].address += regions[i].name + " ";
// }
// // listTemp[index].address = regions[0].name + ' ' + regions[1].name + ' ' + regions[2].name + ' ';
// }
// getRegionByCodes([...allRegions]);
// }
if(res.data.data){
res.data.data.forEach(function (item) {
allList.push(item);
});
if(res.data.data.length< this.listQuery.limit && this.list.length>0){
//已加载全部
this.nomore = true;
}
getRegionByCodes([...allRegions]);
}
res.data.data.forEach(function (item) {
allList.push(item);
});
if(res.data.data.length< this.listQuery.limit && this.list.length>0){
//已加载全部
this.nomore = true;
}
this.list = [...this.list, ...allList];
this.send = !1;
......@@ -381,5 +512,14 @@
},
mounted() {
},
watch:{
Height(newVal,oldVal){
if(newVal<136){
this.Height = 136
}else if(newVal>406){
this.Height = 406
}
}
}
}
</script>
<template>
<div style="background:#F8F8F8;height:100%">
<div class="swiper-container" ref="swiperContainer">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in imgList" :key="index">
<img :src="item" alt="" style="width:100%;height:180px">
</div>
</div>
<div class="swiper-pagination" ref="swiperPagination"></div>
</div>
<div class="describesBox">
<div class="companyName">{{name}}</div>
<div class="address">地址:{{address}}</div>
<div class="describes" v-html="describes"></div>
</div>
<div class="contentBox">
<div class="title">
<div class="yuan" style="margin-right:5px"></div>
<div>公司特色</div>
<div class="yuan" style="margin-left:5px"></div>
</div>
<div v-html="content"></div>
</div>
<div style="height:40px;background:#fff" v-if="showFixedBox"></div>
<div class="fixedBox" v-if="showFixedBox" @click="apply">申请入股</div>
</div>
</template>
<style scoped>
.swiper-container {width: 100%;height: 180px;}
.describesBox{width: 100%;border-radius: 5px 5px 0 0;margin-top: -5px;background: #fff;padding: 20px 15px;position: relative;top: -10px;z-index: 2;}
.companyName{font-size:17px;color: #171413;font-weight:500;line-height:32px;}
.address{font-size:11px;color: #999;margin-bottom: 20px}
.describes{font-size: 12px;color: #666}
.contentBox{width: 100%;background: #fff;padding: 20px 15px;}
.contentBox .title{font-size: 17px;color: #171413;display: flex;justify-content: center;align-items: center;margin-bottom: 20px}
.yuan{width: 6px;height: 6px;border-radius: 50%;border: 1px solid #DCBE8F}
.fixedBox{width: 100%;height: 40px;line-height: 40px;font-size: 14px;color: #fff;position: fixed;bottom: 0;background: #C1A170;text-align: center}
</style>
<script>
import Swiper from 'swiper';
import {getDetail} from 'api/base_info/branch_company';
import {mapGetters} from 'vuex';
export default {
components:[Swiper],
name: 'companyDetail',
data() {
return {
showFixedBox:1,
id:'',
imgList:[],
name:'',
address:'',
describes:'',
content:'',
}
},
created() {
let id = this.$route.query.id;
this.id = this.$route.query.id;
this.detail();
if(this.$route.query.showFixedBox==1){
this.showFixedBox = true
}else{
this.showFixedBox = false
}
},
methods: {
apply(){
this.$router.push({path: '/stockCrowdDetail?id=' + this.id})
},
detail(){
getDetail(this.id).then(res=>{
console.log(res)
if(res.status == 200){
if(res.data.images!=''){
var arr = res.data.images.split(',')
this.imgList = arr
this.$nextTick(function () {
this.swiperInit()
})
}else{
this.imgList = []
}
this.name = res.data.name
this.address = res.data.address
this.describes = res.data.describes
this.content = res.data.content
}
})
},
swiperInit(){
new Swiper(this.$refs.swiperContainer, {
pagination: {
el: this.$refs.swiperPagination,
clickable: true
},
spaceBetween: 0,
centeredSlides: true,
autoplay:{
delay:2000
},
autoplayDisableOnInteraction:true,
observer:true
    });
}
},
mounted() {
},
}
</script>
<template>
<baidu-map id="map" class="map" style="height: 350px;" :center="center" :zoom="zoom" @ready="handler" @click="mapClick(this, $event)">
<baidu-map id="map" class="map" style="height: 350px;margin-top: 42px;" :center="center" :zoom="zoom" @ready="handler" @click="mapClick(this, $event)">
<!-- 缩放 -->
<bm-navigation anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-navigation>
</baidu-map>
......@@ -11,6 +11,7 @@
import {
getSonRegionByCodes,
getRegionByCodes,
getAddressInfor
} from 'api/base_info/region/';
import {
campsiteAllPage,
......@@ -157,7 +158,7 @@
},
addMarker(map) {
let zoom = map.getZoom();
var myIcon = new BMap.Icon('https://cwmp.upyuns.com/attachment/images/4/2019/05/HnFr78H280dv972KuNZku70297rz7z.png',new BMap.Size(16,16));//这里先不用第三个参数IconOptions;
var myIcon = new BMap.Icon('../../../../static/images/small_local.png',new BMap.Size(13,16),{});//这里先不用第三个参数IconOptions;
// if(zoom <6){
// myIcon = new BMap.Icon('https://cwmp.upyuns.com/attachment/images/4/2019/05/HnFr78H280dv972KuNZku70297rz7z.png',new BMap.Size(16,16));//这里先不用第三个参数IconOptions
// }
......@@ -183,6 +184,7 @@
}
},
geolocation(map) {
var self = this;
const geolocation = new BMap.Geolocation();
geolocation.enableSDKLocation();
geolocation.getCurrentPosition(function (r) {
......@@ -194,6 +196,23 @@
map.centerAndZoom("兰州",4);
map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放
console.log('您的位置:' + r.point.lng + ',' + r.point.lat);
//获取当前城市的id
if(r){
$.ajax({
type: 'get',
url: 'http://api.map.baidu.com/geocoder/v2/?ak=wWYw0yCb8ntXmSgTxTx40vKR&callback=renderReverse&location=' + r.point.lat + ',' + r.point.lng + '&output=json&pois=1',
async: false,
jsonp: "callback",
dataType: 'jsonp',
success: function (data) {
var addrCity = data.result.addressComponent.adcode
self.$emit('getAddrCity', addrCity);
},
error: function () {
console.log('请求地区信息出错。');
}
});
}
} else {
alert('failed' + this.getStatus());
}
......
......@@ -6,28 +6,64 @@
<span class="header-title">公司列表</span>
</div>
<div class="main-container">
<div class="shoppings main-container">
<div class="filter-container" ref="filter-container">
<el-form :rules="rules4Query" ref="queryForm" style="display: flex;" :inline="inline" :model="listQuery">
<el-select class="filter-item" style="width: 45%" v-model="listQuery.addrProvince" placeholder="请选择省份(直辖市)" @change='getValue'>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="item in provinceRegions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select class="filter-item" style="width: 45%;margin-left: 10px;" v-model="listQuery.addrCity" placeholder="请选择城市" @change='getCompanyList'>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="item in cityRegions4Query" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form>
</div>
</div>
<!--分公司分布图-->
<company-map v-on:headCallBack="headCall" v-if="toList" :toSonData="type" :provinceName="provinceName"></company-map>
<company-map v-on:headCallBack="headCall" v-on:getAddrCity="getAddrCity" v-if="toList" :toSonData="type" :provinceName="provinceName"></company-map>
<!--分公司数据-->
<div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0">
<div class="shoppings company-list"
v-for="item in list"
:key="item.key"
>
<div style="border-radius:5px 5px 0 0;background: #fff;position: absolute;bottom: 0px;width:100%;">
<div style="text-align:center">
<img style="width: 10%;" :src="Height>=306?'../../../../static/images/top.png':'../../../../static/images/bottom.png'" alt="">
</div>
<div class="moveBox" id="moveDiv" @mousedown="down" @touchstart="down" @mousemove="move" @touchmove="move" @mouseup="end" @touchend="end">
<div class="moveBoxLeft" v-if="!otherProvince">
<div class="moveBoxItem" :class="index==1?'active':''" @click="quanguo">全国<div class="bage" v-show="index==1"></div></div>
<div class="moveBoxItem" :class="index==2?'active':''" @click="currentProvince">当前省<div class="bage" v-show="index==2"></div></div>
<div class="moveBoxItem" :class="index==3?'active':''" @click="currentCity">当前市<div class="bage" v-show="index==3"></div></div>
</div>
<div style="color:#999;font-size:13px" v-if="!otherProvince" @click="showAddress">其他省市<span class="arrow-bottom"></span></div>
<div class="moveBoxLeft" v-if="otherProvince" style="justify-content: space-between;">
<div style="color:#171413;font-size:15px">{{provinceCity}}</div>
<img width="15" src="../../../../static/images/close.png" alt="" @click.stop="close">
</div>
</div>
<div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" :style="{ height: 'calc(100vh - '+Height+'px)'}" style="overflow:hidden;overflow-y:scroll;">
<div class="shoppings company-list" v-for="item in list" :key="item.key">
<div class="item-right-p company-item" @click="view(item.comnpanyBaseId)">
<img class="companyImg" :src="item.cover" alt="" srcset="">
<div class="companyInforBox">
<div class="company-name ellipsis2">{{item.name}}</div>
<div class="companyInfor">
<div class="companyInforLeft">
<div>总经理:{{item.leader}}</div>
<div>电话:{{item.leaderContactInfo}}</div>
</div>
<a :href="'tel:'+item.leaderContactInfo" class="companyInforRight">拨打电话</a>
</div>
</div>
</div>
<div class="addressBox">
<div class="addressLeft">
<img width="11" style="margin-right:5px" src="../../../../static/images/local.png" alt="" srcset="">
<div class="ellipsis" style="color:#666;font-size:11px;vertical-align: 2px;width:200px">{{item.address}}</div>
</div>
<div class="addressRight" @click="openAddress(item)">
<img width="15" src="../../../../static/images/go.png" alt="" srcset="">
<span style="color:#666;font-size:11px;padding-left:5px;vertical-align: 2px;">到这去</span>
</div>
</div>
</div>
<infinite-loading v-show="loading" spinner="spiral" style="margin-top:2em" ref="sroller">
</infinite-loading>
<div v-if="nomore && !loading" style="text-align: center;color: #999;padding: 10px;color:#999;font-size:12px">
没有更多啦~~
</div>
<div v-if="toList && !loading && list.length == 0" style="text-align: center;color: #999;padding: 10px;">
<img src="../../../../static/images/noThing.png" alt="" srcset="" style="width:50%">
<div style="color:#999;font-size:12px">当前地区暂无公司</div>
</div>
</div>
</div>
<!-- <div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0">
<div class="shoppings company-list" v-for="item in list" :key="item.key">
<div class="item-right-p company-item">
<div class="ellipsis company-name">{{item.name}}</div>
<p class="ellipsis">总经理:{{item.leader}}</p>
......@@ -43,8 +79,9 @@
<div v-if="toList && !loading && list.length == 0" style="text-align: center;color: #999;padding: 10px;">
---暂无数据---
</div>
</div>
</div> -->
</div>
<Address v-on:cancel="cancel" v-on:complete="complete" v-if="addressShow"></Address>
</div>
</template>
<style>
......@@ -58,7 +95,7 @@
font-weight: 600;
}
.company-item{
border-bottom: 1px solid #ccc;
/* border-bottom: 1px solid #ccc; */
padding: 5px 0;
}
.company-item p{
......@@ -66,6 +103,39 @@
color: #666;
padding-left: 0 !important;
}
.header-title {
text-align: center;
width: 100%;
}
.company-name{
font-size: 15px;
color: #171413;
font-weight: 500;
}
.company-list{
border-bottom: 1px solid #EEEEEE;
}
.company-item{
padding: 15px 15px 0 15px;
display: flex;
display: -webkit-box;
display: -webkit-flex;
align-items: center;
}
.moveBoxItem{margin-right: 30px;position: relative;}
.bage{position: absolute;width: 18px;height: 3px;border-radius: 5px;background: #C1A170;left: 50%;transform: translateX(-50%);bottom: -5px}
.arrow-top{margin-left: 5px;vertical-align: 6px;font-size: 0;line-height: 0;border-width: 4px;border-color: #999;border-top-width: 0;border-style: dashed;border-bottom-style: solid;border-left-color: transparent;border-right-color: transparent;}
.arrow-bottom{margin-left: 5px;vertical-align: 2px;font-size: 0;line-height: 0;border-width: 4px;border-color: #999;border-bottom-width: 0;border-style: dashed;border-top-style: solid;border-left-color: transparent;border-right-color: transparent;}
.companyImg{width: 95px;height: 75px;border-radius: 5px;margin-right: 10px}
.companyInforBox{flex: 1;border-bottom: 1px solid #eee;display: flex;display: -webkit-box;display: -webkit-flex;flex-flow: column;}
.companyInfor{display: flex;display: -webkit-box;display: -webkit-flex;justify-content: space-between;align-items: center;margin: 10px 0;}
.companyInforLeft{flex:1;color: #666666;font-size: 12px}
.companyInforRight{height: 27px;border-radius: 15px;background: #D1B17E;color: #fff;font-size: 12px;line-height: 29px;padding: 0 15px}
.moveBox{width: 100%;padding: 20px 15px 5px 15px;display: flex;display: -webkit-box;display: -webkit-flex;justify-content: space-between;align-items: center;border-bottom: 1px solid #eee;}
.moveBoxLeft{flex: 1;display: flex;display: -webkit-box;display: -webkit-flex;font-size: 13px;color: #666;align-items: center}
.moveBoxLeft .active{font-size: 15px;color: #171413}
.addressBox{display: flex;justify-content: space-between;align-items: center;padding: 5px 15px}
.addressLeft{flex: 1;display: flex;}
</style>
<script>
......@@ -92,7 +162,7 @@
import infiniteScroll from 'vue-infinite-scroll'
import InfiniteLoading from 'vue-infinite-loading'
import Address from "../../../components/address/index.vue";
export default {
name: 'branchCompany',
directives: {
......@@ -101,9 +171,21 @@
components: {
BmMap,
InfiniteLoading,
companyMap},
companyMap,
Address},
data() {
return {
flags: false,
position: { x: 0, y: 0 },
nx: '', ny: '', dx: '', dy: '', xPum: '', yPum: '',
Height:406,
otherProvince:false,
provinceCity:'',
addrCity:undefined,
addrProvince:undefined,
addressShow:false,
index:1,
isCityActive:false,
type: "companyInfo",
toList: false,
nodata: false,
......@@ -245,9 +327,7 @@
}
},
created() {
this.branchCompany_btn_edit = this.elements['branchCompany:btn_edit'];
this.branchCompany_btn_del = this.elements['branchCompany:btn_del'];
this.branchCompany_btn_add = this.elements['branchCompany:btn_add'];
},
computed: {
...mapGetters([
......@@ -283,6 +363,91 @@
}
},
methods: {
view(id) {
console.log(id)
this.$router.push({path: '/companyDetail?id=' + id+'&showFixedBox=0'})
},
openAddress(obj){
window.location.href='http://api.map.baidu.com/marker?location='+obj.latitude+','+obj.longitude+'&title='+obj.address+'&content='+obj.address+'&output=html&src=webapp.baidu.openAPIdemo'
},
down(){
this.flags = true;
var touch;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
this.position.x = touch.clientX;
this.position.y = touch.clientY;
this.dx = moveDiv.offsetLeft;
this.dy = moveDiv.offsetTop;
},
move(){
if(this.flags){
var touch ;
if(event.touches){
touch = event.touches[0];
}else {
touch = event;
}
this.nx = touch.clientX - this.position.x;
this.ny = touch.clientY - this.position.y;
this.xPum = this.dx+this.nx;
this.yPum = this.dy+this.ny;
this.Height = Number(this.Height) + Number(this.yPum)
// //阻止页面的滑动默认事件
document.addEventListener("touchmove",function(){ // 1.2 如果碰到滑动问题,请注意是否获取到 touchmove
// event.preventDefault();//jq 阻止冒泡事件
event.stopPropagation(); // 如果没有引入jq 就用 stopPropagation()
},false);
}
},
//鼠标释放时候的函数
end(){
this.flags = false;
},
close(){
this.otherProvince = false
},
quanguo(){
this.index=1
this.listQuery.addrProvince = undefined
this.listQuery.addrCity = undefined
this.getList();
},
currentProvince(){
this.index=2
this.listQuery.addrProvince = this.addrProvince
this.listQuery.addrCity = undefined
this.getList();
},
currentCity(){
this.index=3
this.listQuery.addrProvince = this.addrProvince
this.listQuery.addrCity = this.addrCity
this.getList();
},
showAddress(){
this.addressShow = true
},
cancel(){
this.addressShow = false
this.isCityActive = false
},
complete(e){
console.log(e)
this.provinceCity = e.provinceName+' - '+e.cityName
this.listQuery.addrProvince = e.provinceId
this.listQuery.addrCity = e.cityId
this.addressShow = false
this.otherProvince = true
this.getList();
},
getAddrCity(e){
this.addrCity = e
this.addrProvince = e.substr(0,2)+'0000'
},
getCompanyList(e){
let that = this;
this.provinceRegions.map(function(item){
......@@ -351,23 +516,25 @@
let allList = [];
let listTemp = res.data.data;
//一次读入所有涉及地区,防止多次读取
if (!this.$utils.isEmpty(listTemp)) {
let allRegions = new Set();
for (let index in listTemp) {
allRegions.add(listTemp[index].addrProvince);
allRegions.add(listTemp[index].addrCity);
allRegions.add(listTemp[index].addrTown);
let regions = getRegionByCodes([listTemp[index].addrProvince, listTemp[index].addrCity, listTemp[index].addrTown]);
listTemp[index].address = regions[0].name + ' ' + regions[1].name + ' ' + regions[2].name + ' ';
// if (!this.$utils.isEmpty(listTemp)) {
// let allRegions = new Set();
// for (let index in listTemp) {
// allRegions.add(listTemp[index].addrProvince);
// allRegions.add(listTemp[index].addrCity);
// allRegions.add(listTemp[index].addrTown);
// let regions = getRegionByCodes([listTemp[index].addrProvince, listTemp[index].addrCity, listTemp[index].addrTown]);
// listTemp[index].address = regions[0].name + ' ' + regions[1].name + ' ' + regions[2].name + ' ';
// }
// getRegionByCodes([...allRegions]);
// }
if(res.data.data){
res.data.data.forEach(function (item) {
allList.push(item);
});
if(res.data.data.length< this.listQuery.limit && this.list.length>0){
//已加载全部
this.nomore = true;
}
getRegionByCodes([...allRegions]);
}
res.data.data.forEach(function (item) {
allList.push(item);
});
if(res.data.data.length< this.listQuery.limit && this.list.length>0){
//已加载全部
this.nomore = true;
}
this.list = [...this.list, ...allList];
this.send = !1;
......@@ -382,5 +549,14 @@
},
mounted() {
},
watch:{
Height(newVal,oldVal){
if(newVal<136){
this.Height = 136
}else if(newVal>406){
this.Height = 406
}
}
}
}
</script>
......@@ -5,60 +5,40 @@
<!--<img @click="goBack()" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAfCAYAAADqUJ2JAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjU0OTNGQTA2QTEwNTExRTg4M0E3OUI4RkYwRDg3RUU4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjU0OTNGQTA3QTEwNTExRTg4M0E3OUI4RkYwRDg3RUU4Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTQ5M0ZBMDRBMTA1MTFFODgzQTc5QjhGRjBEODdFRTgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NTQ5M0ZBMDVBMTA1MTFFODgzQTc5QjhGRjBEODdFRTgiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4bKBAsAAAAzklEQVR42qzWWQrCMBDG8VzCtVb01ZuIFJUq4nU8l+AlXEsFXz2CC+iXB2EYgjBL4P/6o4Qk0xD0q4G2aBSMyB590F2LNQkSe6OFFGmhA0PWUqSNjgxZWZEXWkqRDjpZkS46E+Sp2diIXAjyQKUUyRLIXIr0UMWQmQapGTKVInkCKaTIAF0ZMtEgN4aMNZdwR5DYRvskuH1RXEOPPfqtfgIrtFjucY5cTza9a5X1rv27uKUWc3mPXF9I+ma7YuYp4jrXXCet6+xP/o18BRgA2Nl6bmmSdvgAAAAASUVORK5CYII=" size="25" style="width: 15px; height: 20px; margin: 10px">-->
<span class="header-title">分公司入股</span>
</div>
<div class="filter-container" style="position: fixed;padding-left:10px;top: 42px;padding-top:10px;background: #fff;z-index: 999;" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery">
<el-form-item style="margin-bottom: 3px;">
<el-select class="filter-item" style="width: 45%;margin-right: 10px;" v-model="listQuery.addrProvince"
placeholder="请选择省份(直辖市)" @change='getValue'>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="item in provinceRegions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select class="filter-item" style="width: 45%;" v-model="listQuery.addrCity" placeholder="请选择城市">
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="item in cityRegions4Query" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item style="margin-bottom: 3px;">
<el-select class="filter-item" style="width: 70%;margin-right: 10px;" v-model="listQuery.priceStart"
placeholder="股价" @change='getStartValue'>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="item in allStockPrice" :key="item.id" :label="item.name" :value="item"></el-option>
</el-select>
<el-button @click="getList()" style="height: 35px;margin-left: 10px;">搜索</el-button>
</el-form-item>
</el-form>
<div class="filter-container addressSelectBox" ref="filter-container">
<div class="city" @click="showAddress">{{provinceCity}}<span :class="isCityActive?'arrow-top':'arrow-bottom'"></span></div>
<div class="cityBage" v-show="index==1"></div>
<div class="price" @click="showPrice">
{{this.listQuery.priceStart?this.listQuery.priceStart:'股价'}}
<span :class="isPriceActive?'arrow-top':'arrow-bottom'">
<div class="bage" v-show="index==2"></div>
</span>
</div>
</div>
<div class="shoppings main-container">
<div class="shoppings" style="margin-top: 155px;">
<div class="shoppings main-container" :class="{'addressActive':addressShow }">
<div class="shoppings" style="margin-top: 90px;">
<div class="all">
<div class="goods">
<div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0">
<div
class="order-item"
v-for="item in list"
:key="item.key"
@click="view(item.id, item.companyName)"
>
<div class="order-item" v-for="item in list" :key="item.key" @click="view(item.id, item.companyName)">
<div class="item-right-p flex-jcc-aic">
<div style="width: 178px;height: 100px;">
<img :src="item.companyPic" style="width: 100%;height:100%;border-radius: 10px;"/>
<div style="width: 95px;height: 75px;">
<img :src="item.cover" style="width: 100%;height:100%;border-radius: 10px;"/>
</div>
<div style="height: 100px;padding-left: 10px;width: 100%;">
<div style="line-height: 20px;" class="ellipsis2">{{item.companyName}}</div>
<div class="flex-jcb-aic">
<div
style="position: relative;background: #ccc;border-radius: 10px;height: 10px;width: 100px;margin-right: 20px;">
<div :style="{width:item.width}" class="last-css"></div>
</div>
<div class="ft12">剩余:{{item.balance}}</div>
</div>
<div class="ft20">{{item.price}}万/股</div>
<div style="padding-left: 10px;width: 100%;justify-content: space-between;flex-flow: column;display: -webkit-box;display: flex;height: 75px;">
<div style="line-height: 20px;font-size:15px;color:#171413" class="ellipsis2">{{item.companyName}}</div>
<div class="ft20"><span style="font-size:20px;color:#F9615C">{{item.price}}</span>万/股</div>
</div>
</div>
<div class="flex-jcb-aic">
<div style="position: relative;background: #EBEBEB;height: 3px;width:calc(100% - 40px)">
<div :style="{width:item.width}" class="last-css"></div>
<img v-if="item.width.substring(0,item.width.length-1)>0" src="../../../../static/images/mark.png" style="position: relative;width: 10.1px;top: -10px" :style="{left:(item.width.substring(0,item.width.length-1)-2)+'%'}" alt="">
</div>
<div class="ft12">{{item.balance}}</div>
</div>
</div>
<div class="order-item" v-show="!loading" style="color: #999;justify-content: center;" v-if="list.length<=0">---暂无数据---</div>
<div v-show="!loading" style="color: #999;justify-content: center;text-align: center;" v-if="list.length<=0">---暂无数据---</div>
</div>
<infinite-loading v-show="loading" spinner="spiral" style="margin-top:2em" ref="sroller">
</infinite-loading>
......@@ -69,6 +49,8 @@
</div>
</div>
</div>
<Address v-on:cancel="cancel" v-on:complete="complete" v-if="addressShow"></Address>
<pricePick v-on:pricePickcancel="pricePickcancel" v-on:pricePickcomplete="pricePickcomplete" v-if="priceShow"></pricePick>
</div>
</template>
<script>
......@@ -88,12 +70,16 @@
import ElForm from "../../../../node_modules/element-ui/packages/form/src/form.vue";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
import ElButton from "../../../../node_modules/element-ui/packages/button/src/button.vue";
import Address from "../../../components/address/index.vue";
import pricePick from "../../../components/pricePick/index.vue";
export default {
components: {
ElButton,
ElFormItem,
ElForm,
InfiniteLoading
InfiniteLoading,
Address,
pricePick
},
name: 'stockCrowd',
directives: {
......@@ -128,6 +114,12 @@
},
data() {
return {
isCityActive:false,
isPriceActive:false,
index:0,
priceShow:false,
provinceCity:'省-市',
addressShow:false,
inline: true,
page: 1,
loading: false,
......@@ -148,6 +140,44 @@
this.getAllStockPrice();//获取股价列表
},
methods: {
showPrice(){
this.index=2
this.isCityActive = false
this.isPriceActive = true
this.addressShow = false
this.priceShow = true
},
showAddress(){
this.index=1
this.isCityActive = true
this.isPriceActive = false
this.priceShow = false
this.addressShow = true
},
cancel(){
this.addressShow = false
this.isCityActive = false
},
pricePickcancel(){
this.priceShow = false
this.isPriceActive = false
},
complete(e){
console.log(e)
this.provinceCity = e.provinceName+' - '+e.cityName
this.listQuery.addrProvince = e.provinceId
this.listQuery.addrCity = e.cityId
this.addressShow = false
this.isCityActive = false
this.getList();
},
pricePickcomplete(e){
console.log(e)
this.listQuery.priceStart = e
this.priceShow = false
this.isPriceActive = false
this.getList();
},
//获取股价列表
getAllStockPrice() {
let that = this;
......@@ -220,21 +250,21 @@
this.loading = true;
let params = this.objDeepCopy(this.listQuery);//深拷贝
if(this.listQuery.priceStart){
params.priceStart = that.listQuery.priceStart.substring(0,that.listQuery.priceStart.length-1)*10000;
params.priceEnd = that.listQuery.priceStart.substring(0,that.listQuery.priceStart.length-1)*10000;
params.price = that.listQuery.priceStart.substring(0,that.listQuery.priceStart.length-1);
// params.priceEnd = that.listQuery.priceStart.substring(0,that.listQuery.priceStart.length-1)*10000;
}
params.page = this.page++;
stockSearchPage(params)
.then(res => {
this.loading = false;
let allList = [];
res.data.list.forEach(function (item) {
item.price = item.price / 10000;
item.width = (item.total - item.balance) / item.total * 100 + "px";
item.companyPic = "https://mgmt.dfangche.com/vehicle/branchCompany/stock/download/companyPic?realFileRelPath=" + item.companyPic;
res.data.data.forEach(function (item) {
// item.price = item.price / 10000;
item.width = (item.total - item.balance) / item.total * 100 + "%";
// item.companyPic = "https://mgmt.dfangche.com/vehicle/branchCompany/stock/download/companyPic?realFileRelPath=" + item.companyPic;
allList.push(item);
});
if(res.data.list.length< this.listQuery.limit && allList.length>0){
if(res.data.data.length< this.listQuery.limit && allList.length>0){
//已加载全部
this.nomore = true;
}
......@@ -243,9 +273,8 @@
this.busy = false;
},
view(id, name) {
//众筹详情页
console.log(id + "----" + name);
this.$router.push({path: '/stockCrowdDetail?id=' + id + "&name=" + name})
this.$router.push({path: '/companyDetail?id=' + id+'&showFixedBox=1'})
// this.$router.push({path: '/stockCrowdDetail?id=' + id})
},
search: function() {
this.goods = false
......@@ -268,9 +297,8 @@
}
.last-css {
position: relative;
background: #f25b5b;
border-radius: 10px;
height: 10px;
background: #C0A170;
height: 3px;
}
.flex-jcc-aic {
......@@ -283,7 +311,7 @@
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
width: 95%
width: 100%
}
.flex-jcb-aic {
......@@ -301,25 +329,36 @@
.ft20 {
margin-top: 10px;
font-size: 20px;
color: #f25b5b;
font-size: 12px;
color: #666666;
}
.ft12 {
font-size: 12px;
color: #3a3a3a;
color: #999999;
}
.order-item {
display: flex;
/* display: flex; */
align-items: center;
padding: 10px 0;
padding: 15px;
width: 100%;
border-radius: 5px;
box-shadow:0px 5px 15px rgba(153,153,153,0.3);
margin-bottom: 15px
}
.el-form--inline .el-form-item__content {
display: flex;
margin-bottom: 0 !important;
}
.goods{padding: 0 15px}
.cityBage{position: absolute;width: 18px;height: 3px;border-radius: 5px;background: #C1A170;left: 21%;bottom: -1px}
.bage{position: absolute;width: 18px;height: 3px;border-radius: 5px;background: #C1A170;left: 45%;transform: translateX(-100%);bottom: -11px}
.city{position: relative;flex:1;overflow: hidden;white-space: nowrap;text-overflow:ellipsis;word-wrap:break-word;word-break:break-all;color:#333;font-size:15px;}
.price{position: relative;flex:1;border-left:1px solid #e1e1e1;color:#333;font-size:15px}
.addressActive{overflow: hidden;}
.addressSelectBox{position: fixed;top: 42px;background: #fff;z-index: 999;width:100%;padding:10px 0;display:flex;align-items: center;text-align: center;border-bottom:1px solid #e1e1e1}
.arrow-top{margin-left: 5px;vertical-align: 6px;font-size: 0;line-height: 0;border-width: 4px;border-color: #333;border-top-width: 0;border-style: dashed;border-bottom-style: solid;border-left-color: transparent;border-right-color: transparent;}
.arrow-bottom{margin-left: 5px;vertical-align: 2px;font-size: 0;line-height: 0;border-width: 4px;border-color: #333;border-bottom-width: 0;border-style: dashed;border-top-style: solid;border-left-color: transparent;border-right-color: transparent;}
</style>
<template>
<div>
<div style="background:#F8F8F8;height: calc(100vh)">
<div class="header-css">
<!--@click="$router.push({name:'mypoints'})"-->
<img @click="goBack()" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAfCAYAAADqUJ2JAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjU0OTNGQTA2QTEwNTExRTg4M0E3OUI4RkYwRDg3RUU4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjU0OTNGQTA3QTEwNTExRTg4M0E3OUI4RkYwRDg3RUU4Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTQ5M0ZBMDRBMTA1MTFFODgzQTc5QjhGRjBEODdFRTgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NTQ5M0ZBMDVBMTA1MTFFODgzQTc5QjhGRjBEODdFRTgiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4bKBAsAAAAzklEQVR42qzWWQrCMBDG8VzCtVb01ZuIFJUq4nU8l+AlXEsFXz2CC+iXB2EYgjBL4P/6o4Qk0xD0q4G2aBSMyB590F2LNQkSe6OFFGmhA0PWUqSNjgxZWZEXWkqRDjpZkS46E+Sp2diIXAjyQKUUyRLIXIr0UMWQmQapGTKVInkCKaTIAF0ZMtEgN4aMNZdwR5DYRvskuH1RXEOPPfqtfgIrtFjucY5cTza9a5X1rv27uKUWc3mPXF9I+ma7YuYp4jrXXCet6+xP/o18BRgA2Nl6bmmSdvgAAAAASUVORK5CYII=" size="25" style="width: 15px; height: 20px; margin: 10px">
<span class="header-title">入股申请</span>
<span class="header-title" style="margin: 0 auto;padding-right: 40px;">申请入股</span>
</div>
<!--入股详情页-->
<div style="background:#F8F8F8;height:57px"></div>
<!--我要参与-->
<div class="shoppings main-container" v-if="optionName=='detail'">
<div class="shoppings main-container" v-if="optionName=='detail'">
<div class="first" >
<h3>{{companyName}}</h3>
<div class="pad10 tips">
<p>参与须知:</p>
<p>本次提交为意向参与,后续会有专门的工作人员联系您,最终的入股申请参与成功,需要线下确认。</p>
</div>
<el-form :model="form" :rules="rules" ref="form" label-width="100px">
<el-input v-model="form.companyId" hidden></el-input>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="tel">
<el-input v-model="form.tel" placeholder="请输入联系电话"></el-input>
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input v-model="form.count" placeholder="请输入份额"></el-input>
</el-form-item>
</el-form>
<el-input v-model="form.companyId" hidden></el-input>
<div class="inputBox">
<div class="inputBoxLeft"><span style="color:red">*</span>姓名</div>
<div class="inputBoxRight">
<input type="text" placeholder="请输入您的姓名" v-model="form.name">
</div>
</div>
<div class="inputBox">
<div class="inputBoxLeft"><span style="color:red">*</span>联系电话</div>
<div class="inputBoxRight">
<input type="text" placeholder="请输入联系电话" v-model="form.tel">
</div>
</div>
<div class="inputBox" style="margin-top:10px">
<div class="inputBoxLeft"><span style="color:red">*</span>份额/股数</div>
<div class="inputBoxRight">
<input type="text" placeholder="请输入您的份额/股数" v-model="form.count">
</div>
</div>
<ruby class="ruby" v-if="msg">{{msg}}</ruby>
<div class="flex-jcc-aic bottom-button">
<el-button @click="submit('form')">提 交</el-button>
<div class="pad10 tips tipBox">
<img src="../../../../static/images/tip.png" alt="" width="15">
<div class="tipBoxRight">本次提交为意向参与,后续会有专门的工作人员联系您,最终的入股申请是否成功,需要线下确认。</div>
</div>
<div class="submitBox" @click="submit">立即申请</div>
</div>
</div>
<!--参与结果页-->
......@@ -43,7 +49,11 @@
</div>
</template>
<style>
<style scoped>
.inputBox{background: #fff;display: flex;display: flexbox;display: -webkit-box;padding: 13px 15px;}
.inputBoxLeft{width: 80px;color: #333333;font-size: 14px}
.inputBoxRight{flex: 1}
.inputBoxRight input{border: none;color: #333333;font-size: 14px;width: 100%;vertical-align: -2px;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;}
.pad10{
padding: 10px;
}
......@@ -51,7 +61,10 @@
color: #999;
font-size: 14px;
}
.tipBox{display: flex;display: flexbox;display: -webkit-box;align-items: center}
.tipBoxRight{flex:1;color: #666;font-size: 11px;margin-left: 10px}
.submitBox{margin: 30px 15px 15px 15px;background-color: #C1A170;border-radius: 25px;height: 44px;line-height: 44px;color: #fff;font-size: 14px;text-align: center;}
.o5{opacity: 0.5;}
.success-tip{
width: 100px;
height:100px;
......@@ -68,7 +81,7 @@
display: block;
color: red;
font-size: 13px;
padding-bottom: 10px;
padding: 10px 15px;
}
.el-form-item__label{
text-align: left;
......@@ -104,6 +117,7 @@
name: 'stockCrowdDetail',
data() {
return {
noward:true,
optionName:"detail",
form: {
name: undefined,
......@@ -152,6 +166,16 @@
that.msg = "";
if(!that.form.companyId){
that.msg = "请选择待申请的入股项目!"
return false;
}else if(!that.form.name){
that.msg = "请输入姓名"
return false;
}else if(!that.form.tel){
that.msg = "请输入手机号"
return false;
}else if(!that.form.count){
that.msg = "请输入份额"
return false;
}
var isPhone = false;
var isNum = false;
......@@ -184,32 +208,28 @@
}
};
//提交
const set = this.$refs;
set[formName].validate(valid => {
checkPhone(that.form.tel);
checkCount(that.form.count);
if (valid && isPhone) {
stockApply(this.form)
.then(res => {
that.optionName = "crowdResult";
if(res.code==1){
that.img = !0;
} else {
that.img = !1;
}
checkPhone(that.form.tel);
checkCount(that.form.count);
if (isNum && isPhone) {
stockApply(this.form)
.then(res => {
that.optionName = "crowdResult";
if(res.code==1){
that.img = !0;
} else {
that.img = !1;
}
})
} else {
return false;
}
});
})
} else {
return false;
}
}
},
mounted() {
let id = this.$route.query.id;
this.form.companyId = this.$route.query.id;
this.companyName = this.$route.query.name;
}
},
}
</script>
......@@ -42,6 +42,11 @@
<span>{{scope.row.price}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="排序">
<template scope="scope">
<span>{{scope.row.rank}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="地区">
<template scope="scope">
<span>{{getAddrStr(scope.row.addrProvince, scope.row.addrCity)}}</span>
......@@ -70,8 +75,10 @@
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form :model="form" :rules="rules" ref="form" label-width="100px">
<el-form-item label="公司名称" prop="companyName">
<el-input v-model="form.companyName" placeholder="请输入公司名称"></el-input>
<el-form-item label="公司名称" prop="companyId">
<el-select class="filter-item" v-model="form.companyId" clearable filterable placeholder="请选择公司">
<el-option v-for="val in allBranchCompany" :key="val.id" :label="val.name" :value="val.id"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="剩余份额" prop="balance">
<el-input v-model.number="form.balance" placeholder="请输入剩余份额"></el-input>
......@@ -82,7 +89,10 @@
<el-form-item label="股权单价" prop="price">
<el-input v-model.number="form.price" placeholder="请输入股权单价"></el-input>
</el-form-item>
<el-form-item label="省份" prop="addrProvince">
<el-form-item label="排序">
<el-input v-model.number="form.rank" placeholder="请输入排序"></el-input>
</el-form-item>
<!-- <el-form-item label="省份" prop="addrProvince">
<el-select v-model.number="form.addrProvince" placeholder="请选择省份(直辖市)" @change="changeProvince">
<el-option v-for="item in provinceRegions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
......@@ -92,7 +102,7 @@
<el-select v-model.number="form.addrCity" placeholder="请选择城市">
<el-option v-for="item in cityRegions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="状态">
<el-select class="filter-item" v-model.number="state" placeholder="请选择" @change="change">
......@@ -103,16 +113,23 @@
<el-form-item label="公司图片" prop="drivingLicensePath" :style="{display:'block'}">
<el-upload
class="avatar-uploader"
:action="BASE_API+ '/vehicle/branchCompany/stock/upload/companyPic'"
:show-file-list="false"
:headers="getHeaderWithToken"
:action="BASE_API+ '/api/universal/file/app/unauth/admin/upload'"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :style="{display:'block'}">
<img v-if="$utils.isString(form.companyPic) && !$utils.isEmpty(form.companyPic)"
:src="getCompanyPicUrl(form.companyPic)" class="avatar" :style="{display:'block'}">
:src="form.companyPic" class="avatar" :style="{display:'block'}">
<i v-else class="el-icon-plus avatar-uploader-icon" :style="{lineHeight:'350px'}"></i>
</el-upload>
</el-form-item>
<el-tabs v-model="activeName2" type="card">
<el-tab-pane label="公司详情" name="first">
<div class="editor-container" v-if="activeName2=='first'">
<UE :editorId="activeName2" :defaultMsg="form.info" :config=config ref="ue" @ready="editorReadyEvent"></UE>
</div>
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancel('form')">取 消</el-button>
......@@ -124,6 +141,7 @@
</template>
<script>
import UE from '../../modal/Ueditor';//百度ue富文本
import 'static/css/uploadImg.css';
import {
search,
......@@ -132,6 +150,9 @@
updateObj,
delObj
} from 'api/branchCompany/stock/index';
import {
getAll
} from 'api/base_info/branch_company/';
import {
getSonRegionByCodes,
getRegionByCodes
......@@ -145,8 +166,18 @@
export default {
name: 'branchCompanyStock',
components: {
UE
// Editor
},
data() {
return {
activeName2: '',//详情
config: {
initialFrameWidth: null,
initialFrameHeight: 350
},
allBranchCompany:[],
BASE_API: process.env.BASE_API,
showLoadingBody: false,
state: null,
......@@ -174,21 +205,21 @@
]),
form: {
id: null,
companyName: null,
companyId: undefined,
balance: null,
total: null,
price: null,
addrProvince: null,
addrCity: null,
state: null,
companyPic: null
companyPic: null,
info:undefined
},
rules: {
companyName: [
companyId: [
{
required: true,
message: '请输入用户',
trigger: 'blur'
message: '请选择公司'
}
],
total: [
......@@ -252,6 +283,9 @@
},
created() {
this.getList();
getAll().then(response => {
this.allBranchCompany = response.data;
})
this.btn_edit = this.elements['branchCompany/stock:btn_update'];
this.btn_del = this.elements['branchCompany/stock:btn_delete'];
this.btn_add = this.elements['branchCompany/stock:btn_add'];
......@@ -274,6 +308,14 @@
}
},
methods: {
editorReadyEvent(instance){
let t = this;
instance.addListener('contentChange', () => {
if(t.activeName2 == "first"){
t.form.info = instance.getContent();
}
});
},
/**
* 改变省份,清空城市
* */
......@@ -288,14 +330,14 @@
const isJPG = file.type === 'image/jpeg' || file.type === 'image/gif';
const isLt2M = file.size / 1024 / 1024 < 10;
if (!isJPG) {
this.$message.error('上传图片只能是 JPG/GIF 格式!');
}
// if (!isJPG) {
// this.$message.error('上传图片只能是 JPG/GIF 格式!');
// }
if (!isLt2M) {
this.$message.error('上传图片大小不能超过 10MB!');
}
this.showLoadingBody = true;
return isJPG && isLt2M;
return isLt2M;
},
handleAvatarSuccess(res) {
this.form.companyPic = res.data;
......@@ -303,17 +345,31 @@
this.$forceUpdate();
},
handleUpdate(row) {
getObj(row.id)
.then(response => {
this.form = response.data;
this.state = response.data.state;
if (this.state == 0) {
this.state = undefined;
}
console.log('get:state:' + response.data.state);
this.dialogFormVisible = true;
this.dialogStatus = 'update';
});
this.cleanForm();
this.form = row;
if (row.state == 0) {
this.state = undefined;
}
if(row.info!=undefined){
this.form.info = row.info
}else{
this.form.info = ''
}
this.dialogFormVisible = true;
this.activeName2 = "first";
this.dialogStatus = 'update';
// getObj(row.id)
// .then(response => {
// this.form = response.data;
// this.state = response.data.state;
// if (this.state == 0) {
// this.state = undefined;
// }
// console.log('get:state:' + response.data.state);
// this.dialogFormVisible = true;
// this.activeName2 = "first";
// this.dialogStatus = 'update';
// });
},
handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
......@@ -341,15 +397,24 @@
if (valid) {
this.dialogFormVisible = false;
this.form.password = undefined;
updateObj(this.form).then(() => {
this.dialogFormVisible = false;
this.getList();
this.$notify({
title: '成功',
message: '修改成功',
type: 'success',
duration: 2000
});
updateObj(this.form).then( response => {
if (response.status === 200) {
this.dialogFormVisible = false;
this.getList();
this.$notify({
title: '成功',
message: '修改成功',
type: 'success',
duration: 2000
});
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
}
});
} else {
return false;
......@@ -369,7 +434,7 @@
if (valid) {
addObj(this.form)
.then(response => {
if (response.code === rsCode.RS_CODE_SUC) {
if (response.status === 200) {
this.dialogFormVisible = false;
this.getList();
this.$notify({
......@@ -381,7 +446,7 @@
} else {
this.$notify({
title: '失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
message: response.message,
type: 'error',
duration: 2000
});
......@@ -393,23 +458,27 @@
});
},
handleCancel(formName) {
this.activeName2 = '';
this.dialogFormVisible = false;
this.$refs[formName].resetFields();
},
handleCreate() {
this.cleanForm();
this.dialogStatus = 'create';
this.activeName2 = "first";
this.dialogFormVisible = true;
},
cleanForm() {
this.form = {
id: null,
companyName: null,
companyId: undefined,
balance: null,
total: null,
price: null,
addrProvince: null,
addrCity: null
addrCity: null,
rank:'',
info:''
};
},
getList() {
......@@ -439,10 +508,17 @@
'Content-Type': 'multipart/form-data'
}
}
axios.post('/vehicle/branchCompany/stock/importExcel', formData, config).then(function (res) {
if (res.status === 2000) {
axios.post('/vehicle/branchCompany/stock/right/importExcel', formData, config).then(function (res) {
if (res.status === 200) {
/*这里做处理*/
}
}else{
this.$notify({
title: '失败',
message: res.message,
type: 'error',
duration: 2000
});
}
})
},
handleCurrentChange(val) {
......@@ -455,6 +531,13 @@
this.form.state = 0;
}
}
},
watch:{
dialogFormVisible(newVal,oldVal){
if(newVal == false){
this.activeName2 = '';
}
}
}
}
</script>
......@@ -127,7 +127,7 @@
</div>
<div style="display:inline-block" v-show="formdata.valid_type_name=='相对时效'">
<span>领取后</span>
<el-input v-model="formdata.validDays" placeholder="请输入金额" style="width:100px" :disabled="isUpdate"></el-input>
<el-input v-model="formdata.validDays" placeholder="请输入金额" style="width:100px" :disabled="isUpdate" type="number"></el-input>
<span>天有效</span>
</div>
</el-form-item>
......@@ -525,7 +525,17 @@
that.formdata.validStartTime = 0;
that.formdata.validEndTime = 0;
}
if(that.formdata.valid_type_name=='相对时效'){
if(that.formdata.validDays<=0){
this.$notify({
title: '警告',
message: '相对时效时间需大于0',
type: 'warning',
duration: 2000
});
return false
}
}
if(that.formdata.startTimeName=='自定义'){
that.formdata.startTime = new Date(this.formdata.startTimeStr).getTime();
}else{
......
......@@ -53,7 +53,7 @@
</el-table-column>
<el-table-column align="center" label="操作" width="150" fixed="right">
<template scope="scope">
<el-button size="small" class="el-button el-button--text el-button--small" @click="toShowDialog(scope.row)" v-if="scope.row.bookType !=2 && scope.row.bookType !=3">详情</el-button>
<el-button size="small" class="el-button el-button--text el-button--small" @click="toShowDialog(scope.row)" v-if="scope.row.bookType !=2">详情</el-button>
<el-button size="small" class="el-button el-button--text el-button--small" @click="getLogInfo(scope.row)" v-if="vehicleRecords_bookPlan&&scope.row.status==2&&scope.row.vehicleDepartureLogVo==undefined">重新安排</el-button>
</template>
</el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment