Commit 4c4f565e by 黄森林

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	package.json
#	yarn.lock
parents c4ed4b25 48f6dc20
......@@ -6,3 +6,4 @@ node_modules/
.git/
package-lock.json
dist/
deploy/prod/docker-gdtel-gztel-hhr/ui/nginx/html/
FROM nginx
LABEL maintainer="Liph <liph@gzwinsun.com>" app="gdtel-gztel-jyyy-ui"
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk update && apk add ca-certificates tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
COPY dist/ /usr/share/nginx/html/
EXPOSE 80
......@@ -3,16 +3,25 @@ const dev = {
devServer: {
port: 3000,
proxy: {
'/api': {
target: 'http://132.97.20.38:18080',
'/api/auth': {
target: 'http://172.18.101.171:10001',
ws: false,
changeOrigin: true,
pathRewrite: {
//默认所有请求都加了api前缀,需要去掉
'^/api': '/'
}
'^/api/auth/ciop': '/auth/ciop'
}
},
'/api/manager': {
target: 'http://172.18.101.171:10001',
ws: false,
changeOrigin: true,
pathRewrite: {
//默认所有请求都加了api前缀,需要去掉
'^/api/manager': '/manager'
}
}
}
}
}
......
......@@ -12,14 +12,14 @@ const local = {
'^/api/auth/ciop': '/auth/ciop'
}
},
'/api/schoolcenter': {
/*'/api/api/ciop': {
target: 'http://localhost:11091',
//target: 'http://132.97.54.60:58334',
ws: false,
changeOrigin: true,
pathRewrite: {
//默认所有请求都加了api前缀,需要去掉
'^/api/schoolcenter': '/'
'^/api/api/ciop': '/ciop'
}
},
'/api/report': {
......@@ -31,6 +31,26 @@ const local = {
//默认所有请求都加了api前缀,需要去掉
'^/api/report': '/'
}
},
'/api/app': {
target: 'http://localhost:11092',
//target: 'http://132.97.54.60:58334',
ws: false,
changeOrigin: true,
pathRewrite: {
//默认所有请求都加了api前缀,需要去掉
'^/api/app': '/'
}
},*/
'/api/manager': {
target: 'http://localhost:10001',
ws: false,
changeOrigin: true,
pathRewrite: {
//默认所有请求都加了api前缀,需要去掉
'^/api/manager': '/manager'
}
}
}
}
......
FROM nginx
LABEL maintainer="Liph <liph@gzwinsun.com>" app="com.gdtel.gztel.schoolcenter.ui"
COPY nginx/html /etc/nginx/html
COPY nginx/config/ui.conf /etc/nginx/conf.d/default.conf
EXPOSE 11090
CMD ["nginx", "-g", "daemon off;"]
server_tokens off;
server {
listen 11090;
server_name 172.18.101.171;
client_max_body_size 100M;
proxy_connect_timeout 180;
proxy_read_timeout 180;
proxy_send_timeout 180;
location / {
root /etc/nginx/html;
}
location /auth {
proxy_pass http://gateway:10001/auth;
}
# 后端管理接口
location /manager {
proxy_pass http://gateway:10001/manager;
}
# 新用户模块
# 老用户模块
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
#!/bin/bash
rm -rf docker-gdtel-gztel-hhr/ui/nginx/html/*
cp -r ../../dist/* docker-gdtel-gztel-hhr/ui/nginx/html
scp -r docker-gdtel-gztel-hhr/* root@172.18.101.171:/datas/apps/web/docker-gdtel-gztel-hhr/
......@@ -15,8 +15,7 @@
"dependencies": {
"@antv/data-set": "^0.10.2",
"@tinymce/tinymce-vue": "^2.0.0",
"ant-design-vue": "^1.4.5",
"antd-mobile-vue": "^0.4.0",
"ant-design-vue": "^1.4.12",
"apexcharts": "^3.10.1",
"axios": "^0.18.0",
"clipboard": "^2.0.4",
......@@ -24,11 +23,13 @@
"dayjs": "^1.8.17",
"echarts": "^4.5.0",
"enquire.js": "^2.1.6",
"html2canvas": "^1.0.0-rc.5",
"js-cookie": "^2.2.1",
"lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0",
"md5": "^2.2.1",
"nprogress": "^0.2.0",
"qrcodejs2": "^0.0.2",
"reqwest": "^2.0.5",
"tinymce": "^5.1.1",
"vant": "^2.5.2",
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>中国电信广州分公司集约一体化运营门户</title>
<title>一体化运营门户欢迎您</title>
<link rel="icon" href="<%= BASE_URL %>logoJY.png">
<script src="./polyfill.js"></script>
<style>
......
/**
* report的接口管理
*/
import {postAction,postFormAction} from '@/api/manage'
let prefix = 'app/ciop/'
let selectPackage = (params) => postAction(prefix +"packageUpgrade/selectPackage" , params);
let sendVerificationCode = (params) => postAction(prefix +"packageUpgrade/sendVerificationCode" , params);
export {
selectPackage,
sendVerificationCode
}
import {postAction,getAotion} from '@/api/manage'
const prefix = '/schoolcenter/ciop';
const prefix = '/manager/ciop';
// 获取活动列表
let findByList = (params) => postAction(prefix + "/school/partner/list" , params);
......@@ -11,6 +11,18 @@ let modify = (params) => postAction(prefix + "/school/partner/update" , params);
// 编辑
let getlistysm = (params) => postAction(prefix + "/ysmUser/getlist" , params);
// 新增用户
let addPartner = (params) => postAction(prefix + "/school/partner/addPartner" , params);
// 获取县分下拉列表
let getSubstList = (params) => postAction(prefix + "/school/schoolManagement/substList" , params);
// 获取县分下拉列表
let getSchoolList = (params) => postAction(prefix + "/school/schoolManagement/schoolList" , params);
// 获取学子公司职位下级成员列表
let getXzUserList = (params) => postAction(prefix + "/school/partner/getXzUserList" , params);
export {
findByList,modify,getlistysm
findByList,modify,getlistysm,addPartner,getSubstList,getSchoolList,getXzUserList
}
import {postAction,getAotion} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取活动列表
let getList = (params) => postAction(prefix + "/activity/list" , params);
//新增
let addActivity = (params) => postAction(prefix + "/activity/addActivity" , params);
// 编辑
let updateActivity = (params) => postAction(prefix + "/activity/updateActivity" , params);
//新增
let deleteActivity = (params) => postAction(prefix + "/activity/deleteActivity" , params);
export {
getList,addActivity,updateActivity,deleteActivity
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop/';
//订单
let deleteExcel = (params) => postAction(prefix + "exportExcel/deleteExcel" , params);
let uploadExcel = (params) => downFilePost(prefix + "exportExcel/uploadExcel" , params);
let listExportExcel = (params) => postAction(prefix + "exportExcel/listExportExcel" , params);
export {
deleteExcel,
listExportExcel,
uploadExcel
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop/';
//订单
let orderList = (params) => postAction(prefix + "order/list" , params);
let download = (params) => postAction(prefix + "order/download" , params);
//返回订单历史状态
let selectOrderHis = (params) => postAction(prefix +"order/selectOrderHis" , params);
let reviewStudentIdCard = (params) => postAction(prefix +"order/reviewStudentIdCard" , params);
let abnormal = (params) => postAction(prefix +"order/abnormal" , params);
let downloadMoBan = (params) => downFilePost(prefix + "order/downloadMoBan" , params);
let downloadMoBanKD = (params) => downFilePost(prefix + "order/downloadMoBanKD" , params);
//报表
let reportList = (params) => postAction(prefix + "order/getHhrOrderInfo",params);
let reportDownload = (params) => postAction(prefix + "order/outputHhrOrder",params);
export {
orderList,
download,
selectOrderHis,
abnormal,
downloadMoBan,
downloadMoBanKD,
reportList,
reviewStudentIdCard,
reportDownload
}
import {postAction,getAotion} from '@/api/manage'
const prefix = '/schoolcenter/ciop';
const prefix = '/manager/ciop';
// 获取活动列表
let findByList = (params) => postAction(prefix + "/packageManagement/package/list" , params);
......
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/schoolcenter/ciop';
const prefix = '/manager/ciop';
// 宽带产品
let productList = (params) => postAction(prefix + "/product/list" , params);
let productDelete = (id) => postAction(prefix + "/product/delete/"+id);
let productInsert = (params) => postAction(prefix + "/product/insert" , params);
let productUpdate = (params) => postAction(prefix + "/product/update",params);
//适用学校
let universitySchool = (params) => postAction(prefix + "/university/universitySchool",params);
//大学宽带信息
let universityList = (params) => postAction(prefix + "/university/list" , params);
......@@ -13,6 +15,7 @@ let universityDelete = (id) => postAction(prefix + "/university/delete/"+id);
let universityInsert = (params) => postAction(prefix + "/university/insert" , params);
let universityUpdate = (params) => postAction(prefix + "/university/update",params);
//宽带订单
let orderViewList = (params) => postAction(prefix + "/orderView/list" , params);
let download = (params) => downFilePost(prefix + "/orderView/download/" , params);
......@@ -27,5 +30,6 @@ export {
universityInsert,
universityUpdate,
orderViewList,
download
download,
universitySchool
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
let uploadPicture = (params) => postAction(prefix + "/QRCpde/picture" , params);
let listPicture = (params) => postAction(prefix + "/QRCpde/list" , params);
let deletePicture = (id,params) => postAction(prefix + "/QRCpde/deletePicture/"+id , params);
let updateEnable = (id,params) => postAction(prefix + "/QRCpde/updateEnable/"+id , params);
export {
uploadPicture,
listPicture,
deletePicture,
updateEnable
}
import {postAction,getAotion} from '@/api/manage'
const prefix = '/schoolcenter/ciop';
const prefix = '/manager/ciop';
// 获取活动列表
let findByList = (params) => postAction(prefix + "/school/schoolManagement/findByList" , params);
// 回显选择的套餐
// 回显选择的套餐findByList
let choosepages = (params) => postAction(prefix + "/school/schoolManagement/choosepages" , params);
// 编辑
......
import {postAction,getAotion} from '@/api/manage'
const prefix = '/schoolcenter/ciop';
const prefix = '/manager/ciop';
// 获取活动列表
let packagefindByList = (params) => postAction(prefix + "/school/packageManagement/list" , params);
......
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/schoolcenter/ciop';
const prefix = '/manager/ciop';
// 智能平台账号实名
let ysmUserList = (params) => postAction(prefix + "/ysmUser/list" , params);
......
......@@ -2,11 +2,11 @@
* 系统管理的api管理
*/
import { getAction, postAction,postFormAction } from '@/api/manage'
let prefix = 'auth/ciop/'
let prefix = 'auth/ciop'
//忘记密码
let register = (params) => postAction(prefix+"forgerpw/changePwd", params);
let registercode = (params) => postAction(prefix+"forgerpw/verificationCode", params);
let register = (params) => postAction(prefix+"/forgerpw/changePwd", params);
let registercode = (params) => postAction(prefix+"/forgerpw/verificationCode", params);
// 用户管理
let getList = (params) => getAction(prefix+"/dept/tree", params);
let tabList = (params) => getAction(prefix+"/mgr/list", params);
......@@ -19,7 +19,7 @@ let roleTreeList = (params) => postAction(prefix+"/role/roleTreeListByUserId", p
let roleTreeList2 = (params) => postAction(prefix+"/role/roleTreeListByUserId/"+params["id"], {});
let userFreeze= (params) => postAction(prefix+"/mgr/freeze", params);
let userUnFreeze= (params) => postAction(prefix+"/mgr/unfreeze", params);
let changeOtherPwd= (params) => postAction(prefix+"/mgr/changeOtherPwd", params);//超级用户修改密码
let changeOtherPwd= (params) => postAction(prefix+"/mgr/changeOtherPwd", params);//修改密码
//部门管理
const departmentList = (params) => getAction(prefix+"/dept/departmentList", params);
let deptAdd = (params) => postAction(prefix+"/dept/add", params);
......

163 KB | W: | H:

172 KB | W: | H:

src/assets/bg_content.png
src/assets/bg_content.png
src/assets/bg_content.png
src/assets/bg_content.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<div>
<img ref="code2" class="code" :src="images" v-if="images != ''" @mousedown.prevent="move" :style="{'width':(width+'px'),'height':(width+'px')}">
<div ref="code" v-show="false" class="qrcode" :style="{'width':(width+'px'),'height':(width+'px')}"></div>
</div>
</template>
<script>
import draggable from 'vuedraggable';
import QRCode from 'qrcodejs2';
export default {
name: "codeMove",
components:{draggable},
props:{
width:Number
},
data(){
return {
currentX:0,
currentY:0,
desX:0,
desY:0,
timer:null,
positionX:0,
positionY:0,
text:"",
images:""
}
},
methods:{
//生成海报
newCode(text){
//清空内容
this.$refs.code.innerHTML = "";
this.text = text;
new QRCode(this.$refs.code, {
text: text,
width: this.width,
height: this.width
})
listenQrcodeSrc();
let that = this;
function listenQrcodeSrc() {
let qrcodeImg = document.querySelector('.qrcode canvas+img')
let observeConfig = {attributes: true}
let observeCb = (mutationsList, observer) => {
mutationsList.forEach(function (mutation) {
if (
mutation.type.toLowerCase() === 'attributes' &&
mutation.attributeName.toLowerCase() === 'src'
) {
console.log('qrcodeImg src done!', mutation.target.src)
that.images = mutation.target.src;
observer.disconnect()
}
})
}
if (typeof MutationObserver !== 'undefined') {
let observer = new MutationObserver(observeCb)
observer.observe(qrcodeImg, observeConfig)
}
}
},
move(e){
let op = e.currentTarget; //获取目标元素
//算出鼠标相对元素的位置
let disX = e.clientX - op.offsetLeft;
let disY = e.clientY - op.offsetTop;
document.onmousemove = (e)=>{ //鼠标按下并移动的事件
//用鼠标的位置减去鼠标相对元素的位置,得到元素的位置
let left = e.clientX - disX;
let top = e.clientY - disY;
if(left<0){
left = 0;
}
if(left+this.width > 300){
left = 300-this.width;
}
if(top<0){
top = 0;
}
//绑定元素位置到positionX和positionY上面
this.positionX = left;
this.positionY = top;
//移动当前元素
op.style.left = left + 'px';
op.style.top = top + 'px';
};
document.onmouseup = (e) => {
document.onmousemove = null;
document.onmouseup = null;
};
}
}
}
</script>
<style scoped lang="less">
.code{
position: absolute;
width: 100px;
height: 100px;
}
</style>
......@@ -249,4 +249,7 @@
.alert {
margin-bottom: 16px;
}
/*
*/
</style>
......@@ -19,14 +19,6 @@
</span>
<a-tooltip placement="topLeft">
<template slot="title">
<span>系统反馈</span>
</template>
<span class="action" @click="JumpPage">
<a-icon type="file-text"/>
</span>
</a-tooltip>
<a-tooltip placement="topLeft">
<template slot="title">
<span>查看版本信息</span>
</template>
<span class="action" v-if="isDesktop()" @click="visible = true">
......@@ -68,6 +60,12 @@
visible: false
}
},
mounted() {
let timestamp = (new Date()).valueOf();
if((timestamp - this.$store.state.user.info.updateTime) > (24*60*60*1000*90)){
this.updatePassword()
}
},
methods: {
...mapActions(["Logout"]),
...mapGetters(["nickname", "avatar", "userInfo"]),
......@@ -79,10 +77,6 @@
// }
return url;
},
//跳转
JumpPage() {
this.$router.push({path: '/gdtel-gztel-jyyy/system/feedback'})
},
handleLogout() {
const that = this
......
......@@ -11,6 +11,13 @@
<a-spin :spinning="confirmLoading">
<a-form :form="form" class="addModel clearfix">
<a-form-item
v-show="tishi"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="提示:">
<p style="color:red;">您的密码已90天未修改,请修改密码后重新登录</p>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="旧密码">
......@@ -53,17 +60,19 @@
</template>
<script>
import {registercode} from '@/api/system'
import { postAction } from '@/api/manage'
import {mapActions} from 'vuex'
export default {
name: "UserPassword",
data () {
return {
tishi:false,
countdown: 60,// 倒计时秒数
codeMsg: '获取验证码', // 按钮上的文字
timer: null,// 定时器
title:"修改密码",
modalWidth:500,
modalWidth:600,
visible: false,
confirmLoading: false,
verifiedCode: "",
......@@ -107,6 +116,7 @@
}
},
methods: {
...mapActions(["Logout"]),
getCode() {
// 验证码60秒倒计时
if (!this.timer) {
......@@ -149,6 +159,10 @@
//return text;
},
show(uname){
let timestamp = (new Date()).valueOf();
if((timestamp - this.$store.state.user.info.updateTime) > (24*60*60*1000*90)){
this.tishi=true
}
if(!uname){
this.$message.warning("当前系统无登陆用户!");
return
......@@ -159,7 +173,20 @@
}
},
handleCancel () {
if(this.tishi){
this.$message.warning("您的密码已90天未修改,请修改密码后重新登录!");
return this.Logout({}).then(() => {
window.location.href = "/";
//window.location.reload()
}).catch(err => {
this.$message.error({
title: '错误',
description: err.message
})
})
}else {
this.close()
}
},
close () {
this.$emit('close');
......@@ -184,12 +211,25 @@
values.rePwd=values.newPwd
let params = Object.assign(values)
postAction(this.url,params).then((res)=>{
if(res.code){
that.$message.error(res.message);
that.close();
if(res.code!=200){
that.$message.error(res.data);
}else{
that.$message.success(res.message);
this.visible=false
that.close();
if(this.tishi){
return this.Logout({}).then(() => {
that.$message.success("修改成功,请重新登录!");
window.location.href = "/";
//window.location.reload()
}).catch(err => {
that.$message.error({
title: '错误',
description: err.message
})
})
}
that.$message.success(res.message);
}
}).finally(() => {
that.confirmLoading = false;
......
<template>
<a-drawer title="版本信息" placement="right" :visible="visible" @close="close" :closable="false" :maskClosable="true"
width="300">
<a-drawer
title="版本信息"
placement="right"
:visible="visible"
@close="close"
:closable="false"
:maskClosable="true"
width="300"
>
<a-card title="系统UI" size="small">
<p>
<label>版本号:</label>
<span>0.0.59</span>
<span>0.0.1</span>
</p>
</a-card>
</a-drawer>
</template>
<script>
export default {
export default {
name: "VersionModel",
props: {
visible: Boolean,
visible: Boolean
},
data() {
return {
versiondatas:[],
}
versiondatas: []
};
},
methods: {
close() {
this.$emit('update:visible', false);
this.$emit("update:visible", false);
}
},
created() {
}
}
created() {}
};
</script>
<style scoped>
</style>
......@@ -14,7 +14,8 @@ export const asyncRouterMap = [{
path: 'login',
name: 'login',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
},
}
,
{
path: 'register',
name: 'register',
......@@ -44,6 +45,41 @@ export const asyncRouterMap = [{
path: 'newPackageTips',
name: 'newPackageTips',
component: () => import('@views/hhr-view/newpackage/newPackageTips.vue')
},
{
path: 'newPackageTips',
name: 'newPackageTips',
component: () => import('@views/hhr-view/newpackage/newPackageTips.vue')
},
{
path: 'chooseCard',
name: 'chooseCard',
component: () => import('@views/hhr-view/newpackage/chooseCard.vue')
},
{
path: 'danKuan',
name: 'danKuan',
component: () => import('@views/hhr-view/bandwidth/danKuan.vue')
},
{
path: 'rongHe',
name: 'rongHe',
component: () => import('@views/hhr-view/bandwidth/rongHe.vue')
},
{
path: 'packageUpgrade',
name: 'packageUpgrade',
component: () => import('@views/hhr-view/packageUpgrade/packageUpgrade.vue')
},
{
path: 'readAgree',
name: 'readAgree',
component: () => import('@views/hhr-view/newpackage/readAgree.vue')
},
{
path: 'welfareScheme',
name: 'welfareScheme',
component: () => import('@views/hhr-view/packageUpgrade/welfareScheme.vue')
}
]
}
......
......@@ -12,13 +12,11 @@ let Frequency = {
let title =[
{
title: '当前操作',},
{
title: '处理人',},
{
title: '处理时间',},
{
title: '回复信息',}
title: '订单状态',}
];
export default {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,10 +6,12 @@ import {Modal, notification} from 'ant-design-vue'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import { serialize } from '@/utils/util'
const env = process.env.NODE_ENV; //获取当前环境
//获取当前环境
const env = process.env.NODE_ENV;
let api = "/" + window.wsPackName;
if(env === 'development'){ //测试环境默认添加前缀
if(env === 'development'){
//测试环境默认添加前缀
api = '/api/' + window.wsPackName;
}
// 创建 axios 实例
......
<template>
<div>
<img src="/picture/hhr/banner.png" style="width: 100%">
<van-button type="info" style="width: 150px; height: 50px;margin: 10px 20px 10px 20px;">30元/月</van-button>
<van-row type="flex" justify="center">
<p style="width: auto; height: 40px;margin: 10px 10px 0px 10px;">面向学校:广州工商学院(花都校区)</p>
</van-row>
<div style=" background-image: url('./picture/hhr/info_logo_bg.png');
background-repeat: no-repeat;
background-size: 50%;
width: 85%;
height: 85%;
background-position: 70% 0%,right center;
Text-align:center;">
<div style="height:60px;Text-align:center;">资费介绍</div>
</div>
</div>
</template>
<script>
export default {
name: "danKuan"
}
</script>
<style scoped>
</style>
<template>
<div style=" background-image: url('./picture/hhr/01.jpg');
background-repeat: no-repeat;
background-size: 100%;
width: 100%;
height: 150%;">
<div style="height:60px"></div>
<div style="width: auto; height: 80px; background: white;">
<van-row type="flex" justify="center">
<span style="font-size: 28px;text-align: center;color: rgb(1,12,146);width: 80%;margin: auto">绑定29元新黑牛卡校园网提速到50M</span>
</van-row>
<van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 16px' }" />
<van-row type="flex" justify="center">
<span style="font-size: 22px;padding-top: 10px;text-align: center;color: black;width: 80%;margin: auto">请填写以下有效消息</span>
</van-row>
<van-form validate-first @submit="onSubmit" @failed="onFailed">
<van-field v-model="phone" name="phone" label="手机号" :rules="phoneRules" />
<van-field
v-model="code"
center
clearable
label="验证码"
:rules="codeRules"
placeholder="请输入短信验证码"
>
<van-button slot="button" size="small" type="primary">发送验证码</van-button>
</van-field>
<div style=" width: 15.0rem;margin: 10px 20px 10px 70px;">
<span style="color: black;font-size: 14px;"><font style="color:red">注意:</font>
以上填写的手机号和身份证号必须要和办理校园网的本人一致,否则无法绑定进行提速。
</span>
</div>
<div>
<van-grid :column-num="1">
<van-row >
<van-col span="20" offset="2"> <div style="color: black;font-size: 17px;text-align: center;">未有电信号码请按以下按钮办理</div></van-col>
<van-col span="10" offset="8"> <div style="color: black;font-size: 17px;text-align: center;"><van-sticky :offset-top="50">
<van-button type="info">申请办理手机卡</van-button>
</van-sticky></div></van-col>
</van-row>
<van-row type="flex" justify="center">
<p style="color: red;font-size: 14px">请办理完手机卡后,重新访问此网页进行绑定,申请校园网提速。</p>
</van-row>
</van-grid>
</div>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit">
提交
</van-button>
</div>
</van-form>
</div>
</div>
</template>
<script>
import { Toast } from 'vant';
export default {
name:"rongHe",
data(){
this.phoneRules = [
{ required: true, message: '请输入手机号' },
{ validator: this.phoneValidator, message: '手机号格式错误' },
];
this.codeRules = [
{ required: true, message: '请输入验证码' },
{ validator: this.codeValidator, message: '验证码错误' },
];
return{
code: '',
phone: '',
}
}
,
methods: {
// 校验函数返回 true 表示校验通过,false 表示不通过
phoneValidator(val) {
return /1\d{10}/.test(val);
},
// 校验函数返回 Promise 来实现异步校验
codeValidator(val) {
return new Promise(resolve => {
Toast.loading('验证中...');
setTimeout(() => {
Toast.clear();
resolve(/\d{6}/.test(val));
}, 1000);
});
},
onSubmit(values) {
console.log('submit', values);
},
onFailed(errorInfo) {
console.log('failed', errorInfo);
},
},
}
</script>
<style scoped>
</style>
......@@ -3,17 +3,17 @@
background-repeat: no-repeat;
background-size: 100%;
width: 100%;
height: 150%;">
<img src="/picture/hhr/kefu.png" style="width: 10%;float: right;margin-top: 20px;margin-right: 20px" @click="showPopup">
height: 150%; position:relative">
<img src="/picture/hhr/kefu.png" style="width: 10%;position:fixed ;right: 15px;top: 15px" @click="showPopup">
<div style="height:40px"></div>
<div style="background-image: url('./picture/hhr/02.png');background-repeat: no-repeat;background-position: center;background-size: 100%;width: 77%;height: 280px;margin: auto;">
</div>
<div v-show="!newcar">
<div v-show="newcarAll">
<div @click="newcartouch" style="background-image: url('./picture/hhr/03.png'); width: 256px; height: 64px;margin: 20px auto; background-repeat: no-repeat;background-size: 100%;">
</div>
<div style="text-align: center;color: white;font-size: 14px;margin-top: -20px">(新开卡优惠+0息分期购机)</div>
<div style="background-image: url('./picture/hhr/04.png'); width: 256px; height: 64px;margin: 20px auto; background-repeat: no-repeat;background-size: 100%;"></div>
<div style="background-image: url('./picture/hhr/05.png'); width: 256px; height: 64px;margin: 20px auto; background-repeat: no-repeat;background-size: 100%;"></div>
<div @click="packageUpgrade" style="background-image: url('./picture/hhr/04.png'); width: 256px; height: 64px;margin: 20px auto; background-repeat: no-repeat;background-size: 100%;"></div>
<div @click="newcartouchB" style="background-image: url('./picture/hhr/05.png'); width: 256px; height: 64px;margin: 20px auto; background-repeat: no-repeat;background-size: 100%;"></div>
<fieldset class="layui-elem-field"
style="width: 85%;margin: 0 auto;border-radius: 10px;margin-bottom: 10px;background-color: rgba(255,255,255, 0.8);">
<legend style="text-align: center;background-color: white;border-radius: 10px;font-weight: bold;background-color: rgb(244,194,124);width: 50%;">
......@@ -30,14 +30,25 @@
</div>
</fieldset>
</div>
<div v-show="newcar">
<div v-show="newcar" >
<div style="background-image: url('./picture/hhr/06.png'); width: 256px; height: 64px;margin: 20px auto; background-repeat: no-repeat;background-size: 100%;" @click="newPackage"></div>
<div style="height: 250px"></div>
</div>
<van-popup v-model="kefushow">
<img src="/picture/hhr/service-qrcode.jpg" style="width:100%;height: 100%" >
<div v-show="newcarB">
<div style="background-image: url('./picture/hhr/b1.png');width: 256px; height: 64px;margin: 20px auto; background-repeat: no-repeat;background-size: 100%;" @click="danKuan"></div>
<div style="background-image: url('./picture/hhr/b2.png');width: 256px; height: 64px;margin: 20px auto; background-repeat: no-repeat;background-size: 100%;" @click="rongHe"></div>
<div style="height: 250px"></div>
</div>
<div v-show="kefushow">
<van-popup v-model="kefushow" style="width: 90%;height: 45%; display: flex; align-items: center;justify-content: center;" >
<div style="border: 1px solid #e2e2e2;width: 92%;height: 90%;position: fixed;display: flex; align-items: center;justify-content: center;">
<div style="font-size: 20px; color: black;text-align: center;position: fixed;top: 3px">您的专属客服</div>
<img src="/picture/hhr/service-qrcode.jpg" style="width:55%;" >
</div>
</van-popup>
</div>
</div>
</template>
......@@ -47,7 +58,9 @@
name:"hhrCustomer",
data(){
return{
newcarAll:true,
newcar:false,
newcarB:false,
kefushow: false
}
}
......@@ -56,6 +69,11 @@
methods: {
newcartouch(){
this.newcar=true
this.newcarAll=false
},
newcartouchB(){
this.newcarB=true
this.newcarAll=false
},
newcargoback(){
this.newcar=false
......@@ -65,6 +83,15 @@
},
newPackage(){
this.$router.push({path: 'newPackageTips'})
},
danKuan(){
this.$router.push({path: 'danKuan'})
},
rongHe(){
this.$router.push({path: 'rongHe'})
},
packageUpgrade(){
this.$router.push({path: 'packageUpgrade'})
}
}
}
......
<template>
<div class="div-bg">
<div style="display: flex; ">
<img src="/picture/hhr/kefu.png" style="width: 10%;position:fixed ;right: 15px;top: 15px"
@click="showPopup">
</div>
<div class="div-pkg-card-top">
<div class="div-pkg-cards">
<div class="div-pkg-card">
<div class="div-pkg-fee">
<img src="/picture/hhr/pkg-fee-tag.png" height="36px" style="margin-top: -5px;">
<div class="div-pkg-fee-font">
10元/月
</div>
</div>
<img class="pkg-logo" src="/picture/hhr/xueshengzhenglog.png">
<div class="pkg-explain">10元/月</div>
<div class="div-pkg-btns">
<div id="btn-details"><a href="/gdtel-xyzx-hhr/customer/index.do?id=11519&amp;cardId=49">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</div>
<div class="btns-split">&nbsp;</div>
<div id="btn-dopay"><a href="/gdtel-xyzx-hhr/customer/create.do?id=11519&amp;cardId=49">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</div>
</div>
</div>
</div>
<div class="div-pkg-cards">
<div class="div-pkg-card">
<div class="div-pkg-fee">
<img src="/picture/hhr/pkg-fee-tag.png" height="36px" style="margin-top: -5px;">
<div class="div-pkg-fee-font">
28元/月
</div>
</div>
<img class="pkg-logo" src="/picture/hhr/heiniuka.png">
<div class="pkg-explain">30G国内+40G定向大流量</div>
<div class="div-pkg-btns">
<div id="btn-details"><a href="/gdtel-xyzx-hhr/customer/index.do?id=11519&amp;cardId=49">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</div>
<div class="btns-split">&nbsp;</div>
<div id="btn-dopay"><a href="/gdtel-xyzx-hhr/customer/create.do?id=11519&amp;cardId=49">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</div>
</div>
</div>
</div>
<div class="div-pkg-cards">
<div class="div-pkg-card">
<div class="div-pkg-fee">
<img src="/picture/hhr/pkg-fee-tag.png" height="36px" style="margin-top: -5px;">
<div class="div-pkg-fee-font">
28元/月
</div>
</div>
<img class="pkg-logo" src="/picture/hhr/heiniuka.png">
<div class="pkg-explain">30G国内+40G定向大流量</div>
<div class="div-pkg-btns">
<div id="btn-details"><a href="/gdtel-xyzx-hhr/customer/index.do?id=11519&amp;cardId=49">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</div>
<div class="btns-split">&nbsp;</div>
<div id="btn-dopay"><a href="/gdtel-xyzx-hhr/customer/create.do?id=11519&amp;cardId=49">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</div>
</div>
</div>
</div>
</div>
<div v-show="kefushow">
<van-popup v-model="kefushow" style="width: 90%;height: 45%; display: flex; align-items: center;justify-content: center;">
<div style="border: 1px solid #e2e2e2;width: 92%;height: 90%;position: fixed;display: flex; align-items: center;justify-content: center;">
<div style="font-size: 20px; color: black;text-align: center;position: fixed;top: 3px">您的专属客服</div>
<img src="/picture/hhr/service-qrcode.jpg" style="width:55%;" >
</div>
</van-popup>
</div>
</div>
</template>
<script>
export default {
name: "chooseCard",
data(){
return{
kefushow:false
}
},
methods:{
showPopup(){
this.kefushow=true
},
}
}
</script>
<style scoped>
.div-bg {
background-image: url(/picture/hhr/01.jpg);
background-repeat: no-repeat;
background-size: 100%;
width: 100%;
height: 100%;
border: 0;
overflow-y: scroll;
}
.div-pkg-cards {
position: relative;
margin-top: 20px;
margin-bottom: 20px;
}
#btn-dopay {
width: 49.5%;
float: right;
height: 100%;
text-align: center;
background-image: url(/picture/hhr/btn_choosecard_dopay.png);
background-size: 50%;
background-repeat: no-repeat;
background-position: center;
}
.btns-split {
width: 1px;
float: left;
background-color: rgb(110, 126, 190);
height: 100%;
}
#btn-details {
width: 49.5%;
float: left;
height: 100%;
text-align: center;
border-top: 1px;
background-image: url(/picture/hhr/btn_choosecard_details.png);
background-size: 50%;
background-repeat: no-repeat;
background-position: center;
}
.div-pkg-btns {
position: absolute;
width: 80%;
height: 50px;
line-height: 50px;
bottom: 0;
border-color: rgb(110, 126, 190);
border-style: solid;
border-top-width: 1px;
border-left-width: 0;
border-right-width: 0;
border-bottom-width: 0;
}
.pkg-explain {
float: left;
padding: 10px;
width: 60%;
font-size: 16px;
color: black;
}
.pkg-logo {
width: 128px;
max-height: 50px;
margin: 10px;
float: left;
}
.div-pkg-card-top {
margin-top: 20%;
}
.div-pkg-card {
width: 80%;
height: 180px;
margin: auto;
margin-top: 30px;
border-radius: 10px;
background-color: rgb(191, 220, 252);
box-shadow: #4962bd 10px 10px;
background-image: url(/picture/hhr/sim-bg.png);
background-repeat: no-repeat;
background-size: 90px;
background-position: 90% 50%;
}
.div-pkg-fee-font {
background-color: rgb(248, 204, 70);
display: inline-block;
line-height: 36px;
height: 100%;
font-size: 18px;
font-weight: bold;
color: black;
}
.div-pkg-fee {
float: right;
margin-top: 20px;
padding-right: 0;
height: 36px;
}
</style>
<template>
<div>
<img src="/picture/hhr/adv_img.jpg" style="width: 100%">
<van-button type="info" :round="true" size="large">我要领卡</van-button>
<div style="position:relative ">
<img src="/picture/hhr/adv_img.jpg" style="width: 100%; float: right">
<img src="/picture/hhr/kefu.png" style="width: 10%;position:fixed ;right: 15px;top: 15px" @click="showPopup">
<div style="position:fixed ;bottom: 0px;width: 100%">
<van-button type="info" :round="true" size="large" @click="ordercar">我要领卡</van-button>
</div>
<div v-show="kefushow">
<van-popup v-model="kefushow" style="width: 90%;height: 45%; display: flex; align-items: center;justify-content: center;">
<div style="border: 1px solid #e2e2e2;width: 92%;height: 90%;position: fixed;display: flex; align-items: center;justify-content: center;">
<div style="font-size: 20px; color: black;text-align: center;position: fixed;top: 3px">您的专属客服</div>
<img src="/picture/hhr/service-qrcode.jpg" style="width:55%;" >
</div>
</van-popup>
</div>
</div>
</template>
<script>
export default {
name: "newPackageTips"
name: "newPackageTips",
data(){
return{
kefushow:false
}
}
,
methods:{
showPopup(){
this.kefushow=true
},
ordercar(){
this.$router.push({path: 'chooseCard'})
}
}
}
</script>
......
<template>
<div style="position:relative ">
<img src="/picture/hhr/yrym-ruanyan-adv-bg.jpg" style="width: 100%; float: right">
<img src="/picture/hhr/kefu.png" style="width: 10%;position:fixed ;right: 15px;top: 15px" @click="showPopup">
<div style="font-size: 28px;text-align: center;background: white;position:fixed ;bottom: 0px;width: 100%" class="van-hairline--surround">
<div v-show="inQuery">
<van-button loading type="info" loading-text="查询中..." />
</div>
<div style="width: 90%;margin-left: 5%">
<van-cell-group >
<van-field v-model="value" placeholder="身份证/手机号/宽带账号"/>
</van-cell-group>
</div>
<div style="width: 90%;margin-left: 5%">
<van-button round block type="info" native-type="submit" @click="selectPackage">优惠查询</van-button>
</div>
</div>
<div v-show="kefushow">
<van-popup v-model="kefushow"
style="width: 90%;height: 45%; display: flex; align-items: center;justify-content: center;">
<div style="border: 1px solid #e2e2e2;width: 92%;height: 90%;position: fixed;display: flex; align-items: center;justify-content: center;">
<div style="font-size: 20px; color: black;text-align: center;position: fixed;top: 3px">您的专属客服</div>
<img src="/picture/hhr/service-qrcode.jpg" style="width:55%;">
</div>
</van-popup>
</div>
<div v-show="show">
<van-popup v-model="show" style="width: 70%;height: 16%; display: flex; align-items: center;justify-content: center;">
<div style=" background-image: url('./picture/hhr/div-tips-dialog.png');
background-repeat: no-repeat;
background-size: 100%;
width: 100%;
height: 100%;font-size: 22px;padding-top: 10px;text-align: center;">
<span style="">一大波优惠正在赶来中!<br> 敬请期待!</span>
</div>
</van-popup>
</div>
<div v-show="duanxing" >
<van-popup v-model="duanxing"
style="width: 80%;height: 30%; display: flex; align-items: center;justify-content: center;">
<div>
<div style="font-size: 20px; color: black;text-align: center;position: fixed;top: 3px;margin: 0px 0px 20px 0px;">{{phone}}</div>
<div style="margin: 50px 0px 0px 0px;width: 90%;margin-left: 5%">
<van-field
center
clearable
placeholder="请输入短信验证码"
style="width: 100%;height: 30%;"
v-model="yanzhengma"
>
<van-button slot="button" size="small" type="info"
@click.stop.prevent="getCode"
>{{codeMsg}}
</van-button>
</van-field>
<div v-show="prompt" style="color:red;font-size: 20px; color: red;text-align: center;">
验证码有误
</div>
<van-button round block type="info" native-type="submit" @click="welfareScheme">
确认
</van-button>
</div>
</div>
</van-popup>
</div>
</div>
</template>
<script>
import {selectPackage,sendVerificationCode} from "@/api/app/package"
import Vue from 'vue';
import {Field} from 'vant';
export default {
name: "packageUpgrade",
data() {
return {
inQuery:false,
prompt:false,
value: '',
countdown: 0,// 倒计时秒数
codeMsg: '获取验证码', // 按钮上的文字
timer: null,// 定时器
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 10 },
},
yanzhengma: '',
phone: '',
kefushow: false,
show: false,
duanxing: false
};
},
methods: {
getCode() {
let selectOrder = this.value;
// 验证码60秒倒计时
if (!this.timer) {
sendVerificationCode({selectOrder}).then(res => {
if (res.state == 'error'){
console.log()
}else {
console.log()
}
})
//初始化倒计时
this.countdown=60;
this.timer = setInterval(() => {
if (this.countdown > 0 && this.countdown <= 60) {
this.countdown--;
if (this.countdown !== 0) {
this.codeMsg = "重新发送(" + this.countdown + ")";
} else {
clearInterval(this.timer);
this.codeMsg = "获取验证码";
this.countdown = 0;
this.timer = null;
}
}
}, 1000)
}
},
selectPackage() {
this.kefushow=false;
if (this.value == "") {
return;
} else {
this.inQuery=true
let selectOrder = this.value;
if(this.countdown!=0){
this.inQuery=false
this.duanxing = true;
}else {
sendVerificationCode({selectOrder}).then(res => {
this.inQuery=false
if (res.state == 'error'){
this.show=true;
}else {
this.duanxing = true;
this.phone=res.data
//初始化倒计时
this.countdown=60;
this.timer = setInterval(() => {
if (this.countdown > 0 && this.countdown <= 60) {
this.countdown--;
if (this.countdown !== 0) {
this.codeMsg = "重新发送(" + this.countdown + ")";
} else {
clearInterval(this.timer);
this.codeMsg = "获取验证码";
this.countdown = 0;
this.timer = null;
}
}
}, 1000)
}
})}
}
},
showPopup() {
if(this.kefushow == true){
this.kefushow = false
}else {
this.kefushow = true
}
},
welfareScheme(){
if(this.yanzhengma==''){
return;
}
let selectOrder = this.value;
let verificationCode = this.yanzhengma
selectPackage({selectOrder,verificationCode}).then(res => {
if (res.state == 'error'){
this.prompt=true;
}else {
this.$router.push({
path: 'welfareScheme',
})
}
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div style="background-image: url('./picture/hhr/01.jpg');
background-repeat: no-repeat;
background-size: 100%;
width: 100%;
height: 150%; position:relative">
<div style="height:70px"></div>
<img src="/picture/hhr/kefu.png" style="width: 10%;position:fixed ;right: 15px;top: 15px" @click="showPopup">
<div style="background: white;" >
<div style="padding-top:20px">
<van-divider :style="{ borderColor: '#1989fa', padding: '0 16px' }">
<div style="font-size: 22px"> 福利方案</div>
</van-divider>
</div>
<div style="text-align: center;height:100%;margin: 10px 10px 10px 10px;background-color: rgba(128, 128, 128, 0.09);background:#adadad">
<div style=" border-bottom:2px solid green;font-size: 22px">
<van-row>
<van-col span="8"></van-col>
<van-col span="8">原套餐<br>(daiding)</van-col>
<van-col span="8">新套餐<br>(daiding)</van-col>
</van-row>
</div>
<div style=" border-bottom:2px solid green;font-size: 22px">
<van-row>
<van-col span="8">月租</van-col>
<van-col span="8">{{package}}</van-col>
<van-col span="8">(daiding)</van-col>
</van-row>
</div>
<div style=" border-bottom:2px solid green;font-size: 22px">
<van-row>
<van-col span="8">套餐</van-col>
<van-col span="8">(daiding)</van-col>
<van-col span="8">(daiding)</van-col>
</van-row>
</div>
<div style=" border-bottom:2px solid green;font-size: 22px">
<van-row>
<van-col span="8">语音</van-col>
<van-col span="8">(daiding)</van-col>
<van-col span="8">(daiding)</van-col>
</van-row>
</div>
<div style=" border-bottom:2px solid green;font-size: 22px">
<div style="margin: 10px 10px 10px 10px;">
<van-checkbox v-model="checked" shape="square">复选框</van-checkbox>
</div>
</div>
</div>
</div>
<div style="font-size: 28px;text-align: center;background: white;position:fixed ;bottom: 0px;width: 100%" class="van-hairline--surround">
<div style="width: 90%;margin-left: 5%;margin: 20px 5% 20px 5%;">
<van-button round block type="info" native-type="submit" @click="selectPackage">马上办理</van-button>
</div>
</div>
<div v-show="kefushow">
<van-popup v-model="kefushow"
style="width: 90%;height: 45%; display: flex; align-items: center;justify-content: center;">
<div style="border: 1px solid #e2e2e2;width: 92%;height: 90%;position: fixed;display: flex; align-items: center;justify-content: center;">
<div style="font-size: 20px; color: black;text-align: center;position: fixed;top: 3px">您的专属客服</div>
<img src="/picture/hhr/service-qrcode.jpg" style="width:55%;">
</div>
</van-popup>
</div>
</div>
</template>
<script>
import {selectPackage,sendVerificationCode} from "@/api/app/package"
import Vue from 'vue';
import {Field} from 'vant';
export default {
name: "packageUpgrade",
package:'',
data() {
return {
phone: '',
kefushow: false,
};
},
methods: {
selectPackage() {
},
showPopup() {
if(this.kefushow == true){
this.kefushow = false
}else {
this.kefushow = true
}
},
}
}
</script>
<style scoped>
</style>
<template>
<a-drawer
title="二维码创建"
placement="right"
:closable="true"
:visible="visible"
@close="onClose"
width="50%"
:bodyStyle="{'padding':0}"
destroyOnClose
>
<div class="meun-box">
<a-row>
<a-col :span="6">
<!-- <div class="select-btn">
<span>选择图片</span>
<input ref="selectImgae" class="seletImg" type="file" @change="selectImage" />
</div>-->
<a-button type="primary" @click="toImage" v-if="images != ''">生成图片</a-button>
<!-- <a-divider type="vertical"/>
<a-button @click="newCode" v-if="images != ''">生成二维码</a-button>-->
</a-col>
<!--<a-col :span="6" v-if="images!=''">
<a-form-item label="二维码内容:" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
<a-input v-model="codeText"></a-input>
</a-form-item>
</a-col>-->
<a-col :span="18" v-if="images!=''">
<a-form-item label="二维码大小:" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
<a-slider id="code" v-model="codeWidth" :max="300" />
</a-form-item>
</a-col>
</a-row>
</div>
<div class="center-box">
<div class="image-box" ref="imageWrapper" v-if="images!=''">
<code-move ref="code" :width="codeWidth"></code-move>
<img class="bg-img" :src="images" />
</div>
<a-divider />
</div>
<div style="margin-left: 10%">
<h2>操作说明</h2>
<h3>
1.使用鼠标可拖动二维码放置在图片内任何地方(注意:二维码位置不可超出图片范围)
</h3>
<h3>
2.滑动图片上方的滑动条可以调节二维码大小
</h3>
<h3>
3.点击图片上方的生成图片按钮可以下载调节好的二维码图片
</h3>
</div>
</a-drawer>
</template>
<script>
import CodeMove from "../../components/sysmanage/codeMove";
import html2canvas from "html2canvas";
import ACol from "ant-design-vue/es/grid/Col";
export default {
name: "newPoster",
components: { ACol, CodeMove },
data() {
return {
visible: false,
images: "",
codeWidth: 150, //二维码大小
codeText:""
};
},
methods: {
showModal(picture,url) {
this.codeText=url
this.getBase64(picture, 'jpeg', (base64) =>{
// 给原生img对象的src属性赋值
this.images=base64;
this.visible = true;
});
/* this.$nextTick(()=>{
this.newCode()
});*/
setTimeout(() =>{
this.newCode()
},500);
},
onClose() {
this.visible = false;
this.codeWidth=150
},
selectImage() {
let file = this.$refs.selectImgae;
if (!file.files || !file.files[0]) {
return;
}
var reader = new FileReader();
reader.onload = evt => {
let result = evt.target.result;
this.images = result;
};
reader.readAsDataURL(file.files[0]);
},
toImage() {
html2canvas(this.$refs.imageWrapper, {
backgroundColor: null
}).then(canvas => {
let dataURL = canvas.toDataURL("image/png");
this.downloadFile("海报.png", dataURL);
});
},
newCode(){
if(this.codeText === ''){
this.$notification.warning({ message: '系统提示', description:'请输入二维码内容!',duration: 4});
return;
}
this.$refs.code.newCode(this.codeText);
},
getBase64(url, ext, callback) {
let canvas = document.createElement("canvas"); //创建canvas DOM元素
let ctx = canvas.getContext("2d");
let img = new Image;
img.crossOrigin = 'Anonymous';
img.src = url;
img.onload = () => {
canvas.width = img.width; //指定画板的宽度,自定义
canvas.height = img.height; //指定画板的高度,自定义
ctx.drawImage(img, 0, 0, img.width, img.height); //参数可自定义
let dataURL = canvas.toDataURL("image/" + ext);
callback.call(this, dataURL); //回掉函数获取Base64编码
canvas = null;
};
},
downloadFile(fileName, content) {
const blob = this.base64ToBlob(content); // new Blob([content]);
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob, fileName);
} else {
const link = document.createElement("a");
link.href = window.URL.createObjectURL(blob);
link.download = fileName;
//此写法兼容可火狐浏览器
document.body.appendChild(link);
const evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
}
},
base64ToBlob(code) {
const parts = code.split(";base64,");
const contentType = parts[0].split(":")[1];
const raw = window.atob(parts[1]);
const rawLength = raw.length;
const uInt8Array = new Uint8Array(rawLength);
for (let i = 0; i < rawLength; ++i) {
uInt8Array[i] = raw.charCodeAt(i);
}
return new Blob([uInt8Array], { type: contentType });
}
}
};
</script>
<style scoped lang="less">
.meun-box {
left: 0;
right: 0;
height: 80px;
padding: 10px 24px 0;
}
.center-box {
padding-top: 0px;
}
.select-btn {
width: 90px;
height: 32px;
border: 1px solid #eee;
position: relative;
background-color: #00a0e9;
line-height: 31px;
border-radius: 4px;
color: white;
text-align: center;
display: inline-block;
margin-right: 8px;
.seletImg {
opacity: 0;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
}
.image-box {
width: 300px;
height: auto;
overflow: hidden;
position: relative;
margin: auto;
.bg-img {
width: 100%;
}
}
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="文件名:">
<a-input placeholder="文件名" v-model="queryParam.fileName"></a-input>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text, record">
<span>
<a @click="downloadExcel(record.id)">下载</a>
<a-divider type="vertical"/>
<a @click="remove(record.id)">删除</a>
</span>
</template>
<template slot="createTime" slot-scope="text">{{ text | dayjs}}</template>
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {deleteExcel,listExportExcel,uploadExcel} from "@/api/school-center/exportExcel"
import {cloneObject,exportFile} from '@/utils/util';
import moment from "moment";
export default {
name: "exportExcel",
components: {
STable,
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
queryParam: {
fileName :''
},
modelData:{
id:'',
userName:'',
sign:''
},
columns: [
{dataIndex: 'fileName', title: '文件名'},
{dataIndex: 'createName', title: '导出人'},
{dataIndex: 'createTime', title: '导出时间', scopedSlots: {customRender: 'createTime'}},
{
dataIndex: 'operation',
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return listExportExcel(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
moment,
search() {
this.$refs.table.refresh({search: true})
},
remove(exportId) {
deleteExcel({exportId}).then(res => {
if (res.state == 'success') {
this.$message.success(res.data, 5);
}else {
this.$message.success(res.msg, 5);
}
})
},
downloadExcel(exportId) {
let nowdate = moment().format("YYYY-MM-DD");
exportFile(
uploadExcel({exportId}),
"订单清单" + nowdate + ".xls",
);
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="时间选择:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="4" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-button v-show="!callback" @click="handleSubmit" style="margin-left: 10px">导出</a-button>
<a-button v-show="callback" style="margin-left: 10px">
导出中
<a-spin style="margin-left: 5px" size="small" />
</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table
:columns="columns"
:data="rowdata"
bordered
ref="table"
size="small"
class="flex-filling"
:locale="emptyText"
></s-table>
</div>
</template>
<script>
import STable from "@/components/table";
import { reportList, reportDownload } from "@/api/school-center/orderAPI";
import { cloneObject, exportFile } from "@/utils/util";
import moment from "moment";
export default {
name: "hhrReport",
components: {
STable
},
data() {
return {
emptyText: {emptyText: '暂无数据'},
callback: false,
Formtable: this.$form.createForm(this),
queryParam: {
startTime: "",
endTime: ""
},
columns: [
{
title: "时间",
fixed: "left",
children: [
{
title: "业务类型",
children: [
{
title: "县分",
dataIndex: "subName",
width: 80
},
{
dataIndex: "schoolNum",
width: 80,
title: "学校数"
},
{
dataIndex: "studentNum",
width: 80,
title: "学生数"
}
]
}
]
},
{
title: "本周",
children: [
{
title: "新增",
children: [
{ dataIndex: "newUserNumWeek", width: 80,title: "新用户" },
{ dataIndex: "newAloneNumWeek",width: 80, title: "单宽带" },
{ dataIndex: "newMixNumWeek", width: 80,title: "融合宽带" }
]
},
{
title: "存量",
children: [
{ dataIndex: "oldUserNumWeek",width: 100, title: "老用户办理" },
{
dataIndex: "oldContinueNumWeek",
width: 100,
title: "老用户续约"
}
]
},
{
title: "已竣工",
children: [
{ dataIndex: "finishNewNumWeek",width: 80, title: "新增" },
{ dataIndex: "finishOldNumWeek", width: 80,title: "存量" }
]
},
{ dataIndex: "sumWeek", width: 80,title: "总计" }
]
},
{
title: "本月",
children: [
{
title: "新增",
children: [
{ dataIndex: "newUserNumMonth",width: 80, title: "新用户" },
{ dataIndex: "newAloneNumMonth", width: 80,title: "单宽带" },
{ dataIndex: "newMixNumMonth",width: 80, title: "融合宽带" }
]
},
{
title: "存量",
children: [
{
dataIndex: "oldUserNumMonth",
width: 100,
title: "老用户办理"
},
{
dataIndex: "oldContinueNumMonth",
width: 100,
title: "老用户续约"
}
]
},
{
title: "已竣工",
children: [
{ dataIndex: "finishNewNumMonth",width: 80, title: "新增" },
{ dataIndex: "finishOldNumMonth",width: 80, title: "存量" }
]
},
{ dataIndex: "sumMonth", width: 80,title: "总计" }
]
},
{
title: "累计",
children: [
{
title: "新增",
children: [
{ dataIndex: "newUserNumAll",width: 80, title: "新用户" },
{ dataIndex: "newAloneNumAll",width: 80, title: "单宽带" },
{ dataIndex: "newMixNumAll",width: 80, title: "融合宽带" }
]
},
{
title: "存量",
children: [
{ dataIndex: "oldUserNumAll",width: 100, title: "老用户办理" },
{
dataIndex: "oldContinueNumAll",
width: 100,
title: "老用户续约"
}
]
},
{
title: "已竣工",
children: [
{ dataIndex: "finishNewNumAll", width: 80,title: "新增" },
{ dataIndex: "finishOldNumAll",width: 80, title: "存量" }
]
},
{ dataIndex: "sumAll",width: 80, title: "总计" }
]
}
],
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
};
let obj = cloneObject(this.queryParam);
//表示
return reportList(Object.assign(params, obj)).then(res => {
let data = {};
if (res.state !== "success") {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: []
};
} else {
data = {
data: res.data
};
}
return data;
});
}
};
},
methods: {
moment,
search() {
this.$refs.table.refresh({ search: true });
},
//时间事件
onChange(date, dateString) {
if (dateString.length == 0) {
this.queryParam.startTime = "";
this.queryParam.endTime = "";
} else {
this.queryParam.startTime = dateString[0];
this.queryParam.endTime = dateString[1];
}
},
handleSubmit() {
this.callback = true;
let today = new Date();
today.setTime(today.getTime());
let s2 =
today.getFullYear() +
"-" +
(today.getMonth() + 1) +
"-" +
today.getDate();
exportFile(
reportDownload(),
"一人一码统计报表" + s2 + ".xlsx",
this.downloadstatu
);
},
downloadstatu() {
this.callback = false;
}
}
};
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -53,7 +53,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
......@@ -221,7 +221,7 @@
},
data(){
return {
//下载完成状态
emptyText: {emptyText: '暂无数据'},
callback:false,
Formtable: this.$form.createForm(this),
visible: false,
......@@ -274,6 +274,8 @@
return orderViewList(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......
......@@ -23,7 +23,7 @@
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">编辑</a>
<a-divider type="vertical"/>
......@@ -74,10 +74,46 @@
<a-input placeholder="简介" v-decorator="[ 'explains', {rules: [{ required: true, message: '简介不能为空!' ,whitespace:true}]}]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="背景图">
<img style="width: 150px">
<a-upload
ref="upload"
:action=uploadUrl
listType="picture-card"
:fileList="fileList"
:headers="header"
@preview="handlePreview"
@change="handleChange"
:data="fileid"
accept=".jpg"
>
<div>
<a-icon type="plus" />
<div class="ant-upload-text"> <span v-if="fileList.length==0">上传背景图</span> <span v-if="fileList.length>0">更换背景图</span> </div>
</div>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="小图">
<img style="width: 150px">
<a-upload
ref="xiaoupload"
:action=xiaotuuploadUrl
listType="picture-card"
:fileList="fileListxiaotu"
:headers="header"
@preview="handlePreviewxiaotu"
@change="handleChangexiaotu"
:data="fileid"
accept=".png"
>
<div>
<a-icon type="plus" />
<div class="ant-upload-text"> <span v-if="fileListxiaotu.length==0">上传小图</span> <span v-if="fileListxiaotu.length>0">更换小图</span> </div>
</div>
</a-upload>
<a-modal :visible="previewVisiblexiaotu" :footer="null" @cancel="handleCancelxiaotu">
<img alt="example" style="width: 100%" :src="previewImagexiaotu" />
</a-modal>
</a-form-item>
</a-form>
</a-modal>
......@@ -85,6 +121,8 @@
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import STable from '@/components/table';
import {findByList,modify,insert,packageAllList,delet} from "@/api/school-center/packageManagementAPI"
import {cloneObject} from '@/utils/util';
......@@ -95,6 +133,22 @@
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
header:{
"Authorization":Vue.ls.get(ACCESS_TOKEN)
},
previewVisible: false,
previewImage: '',
fileList: [
],
previewVisiblexiaotu: false,
previewImagexiaotu: '',
fileListxiaotu:[],
fileid:{},
brackgroundurl:"manager/ciop/packageManagement/package/backgroundUpload",
xiaotuurl:"manager/ciop/packageManagement/package/xiaotuUpload",
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
//输入框列表
autoCompleteResult:[],
......@@ -139,6 +193,8 @@
return findByList(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......@@ -159,6 +215,60 @@
}
},
methods:{
getuuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},
baseuploadUrl(){
const env = process.env.NODE_ENV; //获取当前环境
let apis = "/";
if(env === 'development'){ //测试环境默认添加前缀
apis = '/api/';
}
return apis
},
xiaotuuploadUrl(){
return this.baseuploadUrl() + this.xiaotuurl
},
uploadUrl(){
return this.baseuploadUrl() + this.brackgroundurl
}
,
//背景图
handleCancel() {
this.previewVisible = false;
},
handlePreview(file) {
this.previewImage = file.url || file.thumbUrl;
this.previewVisible = true;
},
handleChange(obj) {
if (this.fileList.length==2){
this.fileList.splice(0,1)
}else{
this.fileList = obj.fileList;
}
},
//小图
handleCancelxiaotu() {
this.previewVisiblexiaotu = false;
},
handlePreviewxiaotu(file) {
this.previewImagexiaotu = file.url || file.thumbUrl;
this.previewVisiblexiaotu = true;
},
handleChangexiaotu(obj) {
if (this.fileListxiaotu.length==2){
this.fileListxiaotu.splice(0,1)
}else{
this.fileListxiaotu = obj.fileList;
}
},
search() {
this.$refs.table.refresh({search: true})
},
......@@ -176,6 +286,7 @@
})
},
add(){
this.fileid={id:""}
this.modifyvisible=true
this.modifyForm.id=""
this.titleName="添加"
......@@ -192,6 +303,30 @@
},
modifyfunction(data){
this.modifyForm.id=data.id
this.fileid={
id:data.id
}
let url=this.baseuploadUrl()+"manager/"+data.advImg.replace("enclosure","ciop")
if (!(data.advImg == null || data.advImg=="")) {
//下载图片浏览
this.fileList.push({
uid: this.getuuid(),
name: '找不到图片',
status: 'done',
url: url,
})
}
//下载图片浏览
if (!(data.logo == null || data.logo == "")) {
let xiaotuurl = this.baseuploadUrl() +"manager/"+ data.logo.replace("enclosure","ciop")
this.fileListxiaotu.push({
uid: this.getuuid(),
name: '找不到图片',
status: 'done',
url: xiaotuurl,
})
}
this.titleName="编辑"
this.modifyvisible=true
setTimeout(()=>{
......@@ -252,6 +387,8 @@
})
},
createfunctionCancel(){
this.fileList=[]
this.fileListxiaotu=[]
this.modifyvisible=false
this.autoCompleteResult=[]
this.Formtable.setFieldsValue({
......
......@@ -25,7 +25,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
......@@ -53,6 +53,27 @@
</s-table>
<!----弹框-->
<a-modal :title="add ?'添加宽带': '编辑宽带'" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="1024px">
<a-drawer
title="适用学校详情"
placement="right"
:closable="false"
@close="visibleT = false"
:visible="visibleT"
width=" 40%"
>
<p><span>学校名称:{{chouti.universityName}}</span></p>
<p><span>县分:{{chouti.universityRegion}}</span></p>
<p><span>装机地址:{{chouti.universityInstalledAddress}}</span></p>
<p><span>外线方式:{{chouti.universityExteriorLines}}</span></p>
<p><span>揽装工号:{{chouti.universityPackageNumber}}</span></p>
<p><span>地址ID:{{chouti.universityInstalledAddressId}}</span></p>
<p><span>用户类型:{{chouti.universityUserType}}</span></p>
<p><span>月租类型:{{chouti.universityMonthlyRentType}}</span></p>
<p><span>收费模式:{{chouti.universityChargeMode}}</span></p>
<p><span>计费属性:{{chouti.universityChargingAttribute}}</span></p>
<p><span>学校联系号码:{{chouti.universityContactPhone}}</span></p>
</a-drawer>
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="宽带标题:">
<a-input placeholder="宽带标题" v-decorator="[ 'productTitle', {rules: [{ required: true, message: '宽带标题不能为空!' ,validator: 'click'}]} ]"></a-input>
......@@ -70,7 +91,11 @@
<a-input placeholder="包年包月情况" v-decorator="[ 'productRate', {rules: [{ required: true, message: '包年包月情况不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="适用学校:">
<a-input placeholder="适用学校" v-decorator="[ 'productUniversity', {rules: [{ required: true, message: '适用学校不能为空!' ,validator: 'click'}]} ]"></a-input>
<a-select v-model="universityName" style="width: 330px">
<a-select-option @click="universitySchoolName('请选择')" value="请选择">请选择</a-select-option>
<a-select-option @click="universitySchoolName(item)" v-for="item in universitySchool" :value="item.universityId">{{item.universityName}}</a-select-option>
</a-select>
<a @click="visibleT = true">详情</a>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="套餐情况:">
<a-input :rows="10" v-model="modelData.productMealPrice"/>
......@@ -98,7 +123,7 @@
<script>
import STable from '@/components/table';
import {productList,productDelete,productInsert,productUpdate} from "@/api/school-center/productAPI"
import {productList,productDelete,productInsert,productUpdate,universitySchool} from "@/api/school-center/productAPI"
import {cloneObject} from '@/utils/util';
export default {
name: "product",
......@@ -107,6 +132,12 @@
},
data(){
return {
universityIdtrue:true,
universityName:'',
visibleT:false,
chouti:{},
universitySchool:[],
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
......@@ -119,6 +150,7 @@
productState :'' // 宽带狀態
},
modelData:{
universityId:'',
productMealPrice:'',
productMeal:'',
productTitle:'',
......@@ -160,6 +192,8 @@
return productList(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......@@ -180,6 +214,15 @@
}
},
methods:{
universitySchoolName(item){
if(item == '请选择'){
this.modelData.productUniversity=item
}else {
this.modelData.productUniversity=item.universityName
this.modelData.universityId=item.universityId
this.chouti=item
}
},
search() {
this.$refs.table.refresh({search: true})
},
......@@ -192,16 +235,27 @@
})
},
modifyfunction(data){
universitySchool().then(res => {
this.universitySchool=res.data
res.data.forEach(value=>{
if(data.universityId == value.universityId){
this.chouti = value
}
})
console.log(this.universitySchool)
})
if(data != undefined ){
this.productIntroduction=data.productIntroduction,
this.productSetMealIntroduction=data.productSetMealIntroduction,
this.modelData.productMealPrice=data.productMealPrice
this.modelData.productUniversity=data.productUniversity
this.universityName=data.productUniversity
this.modelData.universityId=data.universityId
this.modelData.productId=data.productId
setTimeout(()=>{
this.Formtable.setFieldsValue({
"productMeal":data.productMeal,
"productTitle":data.productTitle,
"productUniversity":data.productUniversity,
"productPrice":data.productPrice,
"productRegion":data.productRegion,
"productRate":data.productRate,
......@@ -209,18 +263,24 @@
})
},0)
this.add=false;
}else {
this.universityName='请选择'
}
this.modifyvisible=true;
},
createfunctionOk(){
if(this.modelData.universityId == '' || this.modelData.universityId == undefined || this.modelData.productUniversity=='请选择'){
this.$notification.error({message: '请选择适用学校', duration: 4})
return
}
let that = this;
that.Formtable.validateFields(['productMeal','productTitle','productPrice','productUniversity','productRegion','productRate','productState'], {force: true}, (err, values) => {
that.Formtable.validateFields(['productMeal','productTitle','productPrice','productRegion','productRate','productState'], {force: true}, (err, values) => {
if (err ) {
return;
}
that.modelData.productMeal=values.productMeal
that.modelData.productTitle=values.productTitle
that.modelData.productUniversity=values.productUniversity
that.modelData.productPrice=values.productPrice
that.modelData.productRegion=values.productRegion
that.modelData.productRate=values.productRate
......@@ -264,10 +324,11 @@
that.modelData.productId=''
that.modelData.productIntroduction=''
that.modelData.productSetMealIntroduction=''
that.modelData.productUniversity='',
that.modelData.universityId='',
this.Formtable.setFieldsValue({
productMeal:'',
productTitle:'',
productUniversity:'',
productPrice:'',
productRegion:'',
productRate:'',
......
......@@ -27,7 +27,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
......@@ -68,6 +68,9 @@
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="揽装工号:">
<a-input placeholder="揽装工号" v-decorator="[ 'universityPackageNumber', {rules: [{ required: true, message: '揽装工号不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="地址ID:">
<a-input placeholder="地址ID" v-decorator="[ 'universityInstalledAddressId', {rules: [{ required: true, message: '地址ID不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="用户类型:">
<a-input placeholder="如:校园天翼宽带用户" v-decorator="[ 'universityUserType', {rules: [{ required: true, message: '用户类型不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
......@@ -105,6 +108,7 @@
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
......@@ -118,6 +122,7 @@
universityInstalledAddress:'',
universityExteriorLines:'',
universityPackageNumber:'',
universityInstalledAddressId:'',
universityUserType:'',
universityContactPhone:'',
universityMonthlyRentType:'',
......@@ -133,6 +138,7 @@
{dataIndex: 'universityInstalledAddress', width: 300, title: '装机地址'},
{dataIndex: 'universityExteriorLines', width: 120, title: '外线方式 '},
{dataIndex: 'universityPackageNumber', width: 100, title: '揽装工号 '},
{dataIndex: 'universityInstalledAddressId', width: 150, title: '地址ID'},
{dataIndex: 'universityUserType', width: 150, title: '用户类型 '},
{dataIndex: 'universityMonthlyRentType', width: 80, title: '月租类型 '},
{dataIndex: 'universityChargeMode', width: 120, title: '收费模式 '},
......@@ -158,6 +164,8 @@
return universityList(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......@@ -199,6 +207,7 @@
"universityInstalledAddress":data.universityInstalledAddress,
"universityExteriorLines":data.universityExteriorLines,
"universityPackageNumber":data.universityPackageNumber,
"universityInstalledAddressId":data.universityInstalledAddressId,
"universityUserType":data.universityUserType,
"universityContactPhone":data.universityContactPhone,
"universityMonthlyRentType":data.universityMonthlyRentType,
......@@ -214,7 +223,7 @@
},
createfunctionOk(){
let that = this;
that.Formtable.validateFields(['universityName','universityRegion','universityInstalledAddress','universityExteriorLines','universityPackageNumber','universityUserType',
that.Formtable.validateFields(['universityName','universityRegion','universityInstalledAddress','universityExteriorLines','universityPackageNumber','universityInstalledAddressId','universityUserType',
'universityContactPhone','universityMonthlyRentType','universityChargeMode','universityChargingAttribute','speed','publicNumber'], {force: true}, (err, values) => {
if (err ) {
return;
......@@ -224,6 +233,7 @@
that.modelData.universityInstalledAddress=values.universityInstalledAddress
that.modelData.universityExteriorLines=values.universityExteriorLines
that.modelData.universityPackageNumber=values.universityPackageNumber
that.modelData.universityInstalledAddressId=values.universityInstalledAddressId
that.modelData.universityUserType=values.universityUserType
that.modelData.universityContactPhone=values.universityContactPhone
that.modelData.universityMonthlyRentType=values.universityMonthlyRentType
......@@ -272,6 +282,7 @@
"universityInstalledAddress":'',
"universityExteriorLines":'',
"universityPackageNumber":'',
"universityInstalledAddressId":'',
"universityUserType":'',
"universityContactPhone":'',
"universityMonthlyRentType":'',
......
......@@ -22,7 +22,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text, record">
<span>
<a @click="modifyfunction(record)">修改</a>
......@@ -61,6 +61,7 @@
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
......@@ -93,6 +94,8 @@
return ysmUserList(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......
......@@ -17,7 +17,6 @@
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="电话">
<a-input v-model="queryParams.phone" placeholder="请输入" />
......@@ -91,12 +90,30 @@
<!-- 修改密码 -->
<a-modal title="密码修改" v-model="editpaswordmodel" @ok="editPassword" @cancel="editPasswordcancel">
<a-form :form="EditPassFrom">
<a-form-item label="用户密码" >
<a-input placeholder="用户密码" v-decorator="['glyPwd',{rules: [{ required: true, message: '用户密码不能为空!' }]}]" type="password"></a-input>
</a-form-item>
<a-form-item label="新密码" >
<a-input placeholder="新密码" v-decorator="['editpassword',{rules: [{ required: true, message: '新密码不能为空!' }]}]" type="password"></a-input>
</a-form-item>
<a-form-item label="确认密码" >
<a-input placeholder="确认密码" v-decorator="['editrepassword',{rules: [{ required: true, message: '确认密码不能为空' }, { validator: this.compareToFirstPassword,}]}]" type="password"></a-input>
</a-form-item>
<a-form-item label="验证码">
<a-input style="width:350px;margin-right: 10px"
v-decorator="['inputCode',{rules: [{ required: true, message: '验证码不能为空!' }]}]"
type="text"
placeholder="请输入验证码">
</a-input>
<a-button
type="primary"
htmlType="submit"
@click.stop.prevent="getCode"
>{{codeMsg}}
</a-button>
</a-form-item>
</a-form>
</a-modal>
<!-- 添加用户 -->
......@@ -220,6 +237,7 @@ import treeList from '@/components/sysmanage/treeList'
import treecheck from '@/components/sysmanage/treeCheck'
import JDate from '@/components/jeecg/JDate'
import {notification} from 'ant-design-vue'
import { postAction } from '@/api/manage'
import { unique } from '@/utils/util'
import {
getList,
......@@ -247,6 +265,10 @@ export default {
},
data() {
return {
countdown: 60,// 倒计时秒数
codeMsg: '获取验证码', // 按钮上的文字
timer: null,// 定时器
title:"修改密码",
EditPassFrom: this.$form.createForm(this, { name: 'modify'},),
EditPassMess:"不能为空!",
//修改密码窗口
......@@ -255,6 +277,8 @@ export default {
newPwd:"",
rePwd:"",
changeId:"",
glyPwd:'',
inputCode:''
},
settings:{ y: 500,x:2000 },
advanced:false,//控制菜单展开
......@@ -338,10 +362,41 @@ export default {
resetPassw: false,
add_user: false,
Department: false,
reol: false
reol: false,
url: "auth/ciop/mgr/changeOtherPwd",
codeurl:"auth/ciop/mgr/codemessage",
}
},
methods: {
getCode() {
// 验证码60秒倒计时
if (!this.timer) {
postAction(this.codeurl).then((res)=>{
if (res.code==200){
this.$notification.success({
message: res.data,
});
return null;
}
this.$notification.error({
message: res.data,
});
})
this.timer = setInterval(() => {
if (this.countdown > 0 && this.countdown <= 60) {
this.countdown--;
if (this.countdown !== 0) {
this.codeMsg = "重新发送(" + this.countdown + ")";
} else {
clearInterval(this.timer);
this.codeMsg = "获取验证码";
this.countdown = 60;
this.timer = null;
}
}
}, 1000)
}
},
//密码加密
getPass(text){
/*let keyss = setMaxDigits(130);
......@@ -356,20 +411,29 @@ export default {
},
//提交密码修改
editPassword() {
let mima = (/^(?![A-Za-z]+$)(?![A-Z\d]+$)(?![A-Z\W]+$)(?![a-z\d]+$)(?![a-z\W]+$)(?![\d\W]+$)\S{8,}$/);
if(mima.test(this.EditPassFrom.getFieldValue('editpassword'))==false){
this.$message.error("密码强制等级低,必须要数字、小写英文字母、大写英文字母或特殊字符混合组成,长度至少8位!", 5);
return
}
this.EditPassFrom.validateFields(err => {
if (!err) {
this.editpasswordfrom.newPwd= encodeURIComponent(this.getPass(this.EditPassFrom.getFieldValue('editpassword')))
this.editpasswordfrom.rePwd=this.editpasswordfrom.newPwd
this.editpasswordfrom.glyPwd=encodeURIComponent(this.getPass(this.EditPassFrom.getFieldValue('glyPwd')))
this.editpasswordfrom.inputCode=encodeURIComponent(this.getPass(this.EditPassFrom.getFieldValue('inputCode')))
changeOtherPwd(this.editpasswordfrom).then(res => {
if (res.code == 200) {
this.EditPassFrom.setFieldsValue({editpassword:""});
this.EditPassFrom.setFieldsValue({editrepassword:""});
this.EditPassFrom.setFieldsValue({glyPwd:""});
this.EditPassFrom.setFieldsValue({inputCode:""});
if(res.message==undefined){
this.$message.success(res.data != "" ? res.data : "修改成功", 5);
}else {
this.$message.success(res.message != "" ? res.message : "修改成功", 5);
}
this.editpaswordmodel = false
}else{
if(res.message==undefined){
this.$message.error(res.data != "" ? res.data : "失败修改", 5);
......@@ -377,7 +441,7 @@ export default {
this.$message.error(res.message != "" ? res.message : "失败修改", 5);
}
}
this.editpaswordmodel = false
})
}
})
......@@ -386,7 +450,9 @@ export default {
this.editpaswordmodel=false
this.EditPassFrom.setFieldsValue({
editpassword:'',
editrepassword:''
editrepassword:'',
glyPwd:'',
inputCode:''
})
},
compareToFirstPassword (rule, value, callback) {
......
......@@ -75,7 +75,7 @@
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
</a-input>
</a-form-item>
<div class="register">忘记密码?<router-link :to="{path: '/user/register'}">找回密码</router-link></div>
<div class="register"><router-link :to="{path: '/user/register'}">找回密码</router-link></div>
<a-form-item style="margin-top:24vw/@vw">
<a-button
......@@ -125,6 +125,7 @@ export default {
requiredTwoStepCaptcha: false,
stepCaptchaVisible: false,
form: this.$form.createForm(this),
updateTime:'',
formLogin: {
username: "",
password: "",
......@@ -216,7 +217,9 @@ export default {
loginParams.remember = that.formLogin.remember;
loginParams.phonecode=encodeURIComponent(this.getPass(values.phonecode));
//console.log(loginParams);
that.Login(loginParams).then(() => {
that.Login(loginParams).then((res) => {
this.updateTime = res.updateTime
console.log(res.updateTime)
this.departConfirm({});
}).catch((err) => {
that.requestFailed(err);
......
......@@ -99,7 +99,6 @@ import {timeFix} from "@/utils/util"
import Vue from 'vue'
import {ACCESS_TOKEN} from "@/store/mutation-types"
import JGraphicCode from '@/components/jeecg/JGraphicCode'
import {setMaxDigits , RSAKeyPair , encryptedString} from '@/utils/RSA'
import {
register,registercode
} from '@/api/system'
......@@ -165,17 +164,17 @@ export default {
// 验证码60秒倒计时
if (!this.timer) {
let data={
account:this.form.getFieldValue("username")
username:this.form.getFieldValue("username")
}
registercode(data).then(res=>{
if (res.code==200){
this.$notification.success({
message: res.data,
message: res.message,
});
return null;
}
this.$notification.error({
message: res.data,
message: res.message,
});
})
this.timer = setInterval(() => {
......
const path = require('path')
const path = require('path')
function resolve(dir) {
return path.join(__dirname, dir)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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