调整
This commit is contained in:
parent
dceac55ac6
commit
ad691563b7
|
@ -5,7 +5,8 @@ VUE_APP_TITLE = 共享电动车管理系统
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 共享电动车管理系统/开发环境
|
# 共享电动车管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
|
# VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
|
||||||
|
VUE_APP_BASE_API = 'http://localhost:8080'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
"js-cookie": "3.0.1",
|
"js-cookie": "3.0.1",
|
||||||
"jsencrypt": "3.0.0-rc.1",
|
"jsencrypt": "3.0.0-rc.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
|
"qrcode": "^1.5.3",
|
||||||
"quill": "1.3.7",
|
"quill": "1.3.7",
|
||||||
"screenfull": "5.0.2",
|
"screenfull": "5.0.2",
|
||||||
"sortablejs": "1.10.2",
|
"sortablejs": "1.10.2",
|
||||||
|
|
|
@ -17,3 +17,9 @@ export function getDistrictList() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 转二维码
|
||||||
|
export function getQrCodeText(data) {
|
||||||
|
let url = `https://dianche.chuantewulian.cn?sn=`+data.sn;
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
64
src/components/QrCode/index.vue
Normal file
64
src/components/QrCode/index.vue
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<template>
|
||||||
|
<img :src="QRImgUrl" alt="二维码" :width="width" :height="height" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import QRCode from "qrcode";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'QrCode',
|
||||||
|
props: {
|
||||||
|
// 需要生成二维码的内容
|
||||||
|
text: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: Number,
|
||||||
|
default: 100
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
QRImgUrl: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
text(val) {
|
||||||
|
this.getQrCode(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getQrCode(this.text);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取二维码
|
||||||
|
getQrCode(text) {
|
||||||
|
let opts = {
|
||||||
|
errorCorrectionLevel: "L",//容错级别
|
||||||
|
type: "image/png",//生成的二维码类型
|
||||||
|
quality: 0.3,//二维码质量
|
||||||
|
margin: 2,//二维码留白边距
|
||||||
|
width: 128,//宽
|
||||||
|
height: 128,//高
|
||||||
|
text: text,//二维码内容
|
||||||
|
color: {
|
||||||
|
dark: "#333",//前景色
|
||||||
|
light: "#fff"//背景色
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 根据文本生成二维码
|
||||||
|
QRCode.toDataURL(this.text, opts, (err, url) => {
|
||||||
|
if (err) throw err
|
||||||
|
//将生成的二维码路径复制给data的QRImgUrl
|
||||||
|
this.QRImgUrl = url;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -6,7 +6,7 @@ export function getWxSchemeUrl(path, query) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getWxIndexUrl(query) {
|
export function getWxIndexUrl(query) {
|
||||||
let url = `https://dianche.chuantewulian.cn/wxjump/index/action=device`;
|
let url = `https://dianche.chuantewulian.cn?sn=`;
|
||||||
if (query != null ) {
|
if (query != null ) {
|
||||||
if (query instanceof Object) {
|
if (query instanceof Object) {
|
||||||
query = tansParams(query).slice(0, -1);
|
query = tansParams(query).slice(0, -1);
|
||||||
|
|
|
@ -246,6 +246,24 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="停车点还车" label-width="90">
|
||||||
|
<el-radio-group v-model="form.parkingReturn" style="width: 60%">
|
||||||
|
<el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"
|
||||||
|
:label="dict.value">{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="运营区外还车" label-width="120">
|
||||||
|
<el-radio-group v-model="form.areaOutReturn" style="width: 60%">
|
||||||
|
<el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"
|
||||||
|
:label="dict.value">{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="收费方式">
|
<el-form-item label="收费方式">
|
||||||
|
|
|
@ -162,6 +162,69 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<div v-if="form.parentId != 0">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12" v-show="form.isProfitSharing == true">
|
||||||
|
<el-form-item label="平台服务费(%)" label-width="90" prop="platformServiceFee">
|
||||||
|
<el-input style="width: 65%" v-model="form.platformServiceFee" placeholder="请输入平台服务费" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否开启分账" label-width="120" prop="isProfitSharing">
|
||||||
|
<el-switch v-model="form.isProfitSharing" class="drawer-switch" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="appid" prop="appid">
|
||||||
|
<el-input style="width: 93%" v-model="form.appid" placeholder="请输入appid" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="appSecret" prop="appSecret">
|
||||||
|
<el-input v-model="form.appSecret" placeholder="请输入appSecret" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<h2 style="font-weight: 700;font-size: 18px">支付相关</h2>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="商户号" prop="merchantId">
|
||||||
|
<el-input style="width: 93%" v-model="form.merchantId" placeholder="请输入商户号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="apiV3密钥" prop="apiV3Key">
|
||||||
|
<el-input v-model="form.apiV3Key" placeholder="请输入apiV3密钥" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="通知回调地址" label-width="100" prop="notifyUrl">
|
||||||
|
<el-input style="width: 66%" v-model="form.notifyUrl" placeholder="请输入通知回调地址" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="密钥所在位置" label-width="100" prop="privateKeyPath">
|
||||||
|
<el-input style="width: 70%" v-model="form.privateKeyPath" placeholder="请输入密钥所在位置" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="证书序列号" label-width="90" prop="merchantSerialNumber">
|
||||||
|
<el-input style="width: 70%" v-model="form.merchantSerialNumber" placeholder="请输入证书序列号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="退款回调地址" label-width="100" prop="refundNotifyUrl">
|
||||||
|
<el-input style="width: 70%" v-model="form.refundNotifyUrl" placeholder="请输入退款回调地址" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
@ -317,6 +380,7 @@ export default {
|
||||||
this.$set(this.form, "areaIds", response.areaIds);
|
this.$set(this.form, "areaIds", response.areaIds);
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改运营商";
|
this.title = "修改运营商";
|
||||||
|
this.form.isProfitSharing = this.form.isProfitSharing === 'true';
|
||||||
listArea().then(response => {
|
listArea().then(response => {
|
||||||
this.areaOptions = response.rows;
|
this.areaOptions = response.rows;
|
||||||
});
|
});
|
||||||
|
|
|
@ -110,9 +110,6 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="二维码" align="center" width="100">
|
<el-table-column label="二维码" align="center" width="100">
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <image-preview :src="scope.row.qrcode" :width="50" :height="50"/>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<template slot-scope="d">
|
<template slot-scope="d">
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="top"
|
placement="top"
|
||||||
|
@ -120,7 +117,6 @@
|
||||||
trigger="hover">
|
trigger="hover">
|
||||||
<div class="qr-code-box">
|
<div class="qr-code-box">
|
||||||
<qr-code :text="qrCodeText(d.row.sn)" :width="150" :height="150" />
|
<qr-code :text="qrCodeText(d.row.sn)" :width="150" :height="150" />
|
||||||
<!-- <p>扫描二维码进行设备绑定</p>-->
|
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" type="text" icon="el-icon-picture">查看</el-button>
|
<el-button slot="reference" type="text" icon="el-icon-picture">查看</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
@ -302,13 +298,12 @@ import PlaceSearchDialog from '@/components/Map/location/PlaceSearchDialog';
|
||||||
import { parseTime } from '../../../utils/ruoyi';
|
import { parseTime } from '../../../utils/ruoyi';
|
||||||
import LocationMap from '@/components/Map/location/LocationMap.vue';
|
import LocationMap from '@/components/Map/location/LocationMap.vue';
|
||||||
import { listModel} from "@/api/system/model";
|
import { listModel} from "@/api/system/model";
|
||||||
import {getWxIndexUrl} from "@/utils/wx";
|
import QrCode from "@/components/QrCode/index.vue";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Device",
|
name: "Device",
|
||||||
dicts: ['as_online_status', 'as_device_status'],
|
dicts: ['as_online_status', 'as_device_status'],
|
||||||
components: { Map, OrderRecord, RepairRecord, ReplacementRecord, PlaceSearchDialog, LocationMap },
|
components: { Map, OrderRecord, RepairRecord, ReplacementRecord, QrCode, PlaceSearchDialog, LocationMap },
|
||||||
props: {
|
props: {
|
||||||
initLng: {
|
initLng: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -375,7 +370,9 @@ export default {
|
||||||
// 二维码文本
|
// 二维码文本
|
||||||
qrCodeText() {
|
qrCodeText() {
|
||||||
return (sn) => {
|
return (sn) => {
|
||||||
return getWxIndexUrl({ sn: sn});
|
let text = `https://dianche.chuantewulian.cn?sn=`+ sn;
|
||||||
|
console.log("qrCodeText===============", text)
|
||||||
|
return text;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user