Commit 80d815e3 by 伍思炜

bug修复

parent 7a35f0fc
...@@ -241,10 +241,10 @@ ...@@ -241,10 +241,10 @@
</style> </style>
<!-- 全局配置 --> <!-- 全局配置 -->
<script> <script>
window._CONFIG = {}; // window._CONFIG = {};
window._CONFIG['domianURL'] = 'http://localhost:8080/jeecg-boot'; // window._CONFIG['domianURL'] = 'http://localhost:8080/jeecg-boot';
window._CONFIG['imgDomainURL'] = 'http://localhost:8080/jeecg-boot/sys/common/view'; // window._CONFIG['imgDomainURL'] = 'http://localhost:8080/jeecg-boot/sys/common/view';
window._CONFIG['pdfDomainURL'] = 'http://localhost:8080/jeecg-boot/sys/common/pdf/pdfPreviewIframe'; // window._CONFIG['pdfDomainURL'] = 'http://localhost:8080/jeecg-boot/sys/common/pdf/pdfPreviewIframe';
</script> </script>
</head> </head>
......
...@@ -52,7 +52,8 @@ ...@@ -52,7 +52,8 @@
</div> </div>
<!--列表--> <!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small"
class="flex-filling">
<!--拦截器--> <!--拦截器-->
<template slot="statusDefault" slot-scope="text"> <template slot="statusDefault" slot-scope="text">
<span v-if="text=='1'"> <span v-if="text=='1'">
...@@ -85,11 +86,13 @@ ...@@ -85,11 +86,13 @@
</s-table> </s-table>
<!--编辑----弹框--> <!--编辑----弹框-->
<a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="840px"> <a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel"
html-type="submit" width="840px">
<a-form :form="Formtable"> <a-form :form="Formtable">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分">
<a-select placeholder="请选择" v-decorator="[ 'subName', {rules: [{ required: true, message: '县分不能为空!' ,whitespace:true}]} ]"> <a-select placeholder="请选择"
v-decorator="[ 'subName', {rules: [{ required: true, message: '县分不能为空!' ,whitespace:true}]} ]">
<a-select-option key="">请选择</a-select-option> <a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in subNameList" :key="data"> <a-select-option v-for="data in subNameList" :key="data">
{{ data}} {{ data}}
...@@ -97,7 +100,8 @@ ...@@ -97,7 +100,8 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学校名称"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学校名称">
<a-input placeholder="学校名称" v-decorator="[ 'schoolName', {rules: [{ required: true, message: '学校名称不能为空!' ,whitespace:true}]} ]"></a-input> <a-input placeholder="学校名称"
v-decorator="[ 'schoolName', {rules: [{ required: true, message: '学校名称不能为空!' ,whitespace:true}]} ]"></a-input>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="单宽学校名称"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="单宽学校名称">
<a-select placeholder="请选择" v-decorator="[ 'bandproductId']"> <a-select placeholder="请选择" v-decorator="[ 'bandproductId']">
...@@ -122,30 +126,30 @@ ...@@ -122,30 +126,30 @@
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="网点名称"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="网点名称">
<a-input placeholder="网点名称" v-decorator="[ 'networkName' ]"></a-input> <a-input placeholder="网点名称" v-decorator="[ 'networkName' ]"></a-input>
</a-form-item> </a-form-item>
<!-- <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="是否显示宽带办理">--> <!-- <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="是否显示宽带办理">-->
<!-- <a-radio-group v-decorator="['isShowband']">--> <!-- <a-radio-group v-decorator="['isShowband']">-->
<!-- <a-radio value="0">不显示</a-radio>--> <!-- <a-radio value="0">不显示</a-radio>-->
<!-- <a-radio value="1">显示</a-radio>--> <!-- <a-radio value="1">显示</a-radio>-->
<!-- </a-radio-group>--> <!-- </a-radio-group>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="是否显示0息购机">--> <!-- <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="是否显示0息购机">-->
<!-- <a-radio-group v-decorator="['netPhone']">--> <!-- <a-radio-group v-decorator="['netPhone']">-->
<!-- <a-radio value="0">不显示</a-radio>--> <!-- <a-radio value="0">不显示</a-radio>-->
<!-- <a-radio value="1">显示</a-radio>--> <!-- <a-radio value="1">显示</a-radio>-->
<!-- </a-radio-group>--> <!-- </a-radio-group>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="是否显示融合办理">--> <!-- <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="是否显示融合办理">-->
<!-- <a-radio-group v-decorator="['isShowrh']">--> <!-- <a-radio-group v-decorator="['isShowrh']">-->
<!-- <a-radio value="0">不显示</a-radio>--> <!-- <a-radio value="0">不显示</a-radio>-->
<!-- <a-radio value="1">显示</a-radio>--> <!-- <a-radio value="1">显示</a-radio>-->
<!-- </a-radio-group>--> <!-- </a-radio-group>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="是否已收到电信卡">--> <!-- <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="是否已收到电信卡">-->
<!-- <a-radio-group v-decorator="['isRecv']">--> <!-- <a-radio-group v-decorator="['isRecv']">-->
<!-- <a-radio value="0">否</a-radio>--> <!-- <a-radio value="0">否</a-radio>-->
<!-- <a-radio value="1">是</a-radio>--> <!-- <a-radio value="1">是</a-radio>-->
<!-- </a-radio-group>--> <!-- </a-radio-group>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<a-form-item label="按钮配置" :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}"> <a-form-item label="按钮配置" :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}">
<template> <template>
<a-tree-select <a-tree-select
...@@ -187,18 +191,43 @@ ...@@ -187,18 +191,43 @@
accept=".jpg" accept=".jpg"
> >
<div> <div>
<a-icon type="plus" /> <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 class="ant-upload-text"><span v-if="fileList2.length==0">上传二维码</span> <span
v-if="fileList2.length>0">更换二维码</span></div>
</div> </div>
</a-upload> </a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel"> <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" /> <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="老用户升级套餐二维码">
<a-upload
ref="upload"
:action=uploadUrl2
listType="picture-card"
:fileList="fileList2"
:headers="header"
@preview="handlePreview"
@change="handleChange2"
: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-modal>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 15, offset: 1}" label="套餐选择"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 15, offset: 1}" label="套餐选择">
<a-checkbox-group v-model="chosePages" @change="chosePagesfunction"> <a-checkbox-group v-model="chosePages" @change="chosePagesfunction">
<a-row> <a-row>
<a-col :span="8" v-for=" (p,index) in package" v-if="index < more"><a-checkbox :value="p.value" >{{p.label}}</a-checkbox></a-col> <a-col :span="8" v-for=" (p,index) in package" v-if="index < more">
<a-checkbox :value="p.value">{{p.label}}</a-checkbox>
</a-col>
</a-row> </a-row>
<a-button @click="showMore" v-show="isShowMore">更多</a-button> <a-button @click="showMore" v-show="isShowMore">更多</a-button>
<a-button @click="hideMore" v-show="!isShowMore">收起</a-button> <a-button @click="hideMore" v-show="!isShowMore">收起</a-button>
...@@ -251,7 +280,7 @@ ...@@ -251,7 +280,7 @@
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types" import {ACCESS_TOKEN} from "@/store/mutation-types"
import STable from '@/components/table'; import STable from '@/components/table';
import { import {
excelMBOut, excelMBOut,
...@@ -263,9 +292,10 @@ ...@@ -263,9 +292,10 @@
hidestatus, hidestatus,
deleteSchoolById, deleteSchoolById,
} from "../../../api/school-center/schoolManagermentAPI" } from "../../../api/school-center/schoolManagermentAPI"
import {cloneObject,exportFile} from '@/utils/util'; import {cloneObject, exportFile} from '@/utils/util';
import moment from "moment"; import moment from "moment";
import { TreeSelect } from 'ant-design-vue'; import {TreeSelect} from 'ant-design-vue';
const SHOW_PARENT = TreeSelect.SHOW_ALL; const SHOW_PARENT = TreeSelect.SHOW_ALL;
import {getSchoolNames, initSubstName} from "../../../api/school-center/userManager/newUserAPI"; import {getSchoolNames, initSubstName} from "../../../api/school-center/userManager/newUserAPI";
import ImportBtn from "../../../components/sysmanage/ImportBtn"; import ImportBtn from "../../../components/sysmanage/ImportBtn";
...@@ -281,7 +311,7 @@ ...@@ -281,7 +311,7 @@
data: function () { data: function () {
return { return {
yrymXXmoBan: false, yrymXXmoBan: false,
impXXModal:false, impXXModal: false,
importUrl: "", importUrl: "",
importTile: "", importTile: "",
treeCheckStrictly: true, treeCheckStrictly: true,
...@@ -291,33 +321,34 @@ ...@@ -291,33 +321,34 @@
callback: false, callback: false,
previewVisible: false, previewVisible: false,
previewImage: '', previewImage: '',
fileList: [ fileList: [],
], fileList2: [],
header:{ header: {
"Authorization":Vue.ls.get(ACCESS_TOKEN) "Authorization": Vue.ls.get(ACCESS_TOKEN)
}, },
fileid:{}, fileid: {},
brackgroundurl:"manager/ciop/school/schoolManagement/qrcodeUpload", brackgroundurl: "manager/ciop/school/schoolManagement/qrcodeUpload",
brackgroundurl2: "manager/ciop/school/schoolManagement/qrcodeUpload2",
// form // form
Formtable: this.$form.createForm(this, {name: 'Formtable'}), Formtable: this.$form.createForm(this, {name: 'Formtable'}),
titleName:"", titleName: "",
customimg:"", customimg: "",
buttons: [], buttons: [],
modifyForm: { modifyForm: {
id:"", id: "",
networkCode: '', networkCode: '',
networkName: '', networkName: '',
subName:"", subName: "",
schoolName:"", schoolName: "",
netId:"", netId: "",
lzgh:"", lzgh: "",
lzUser:"", lzUser: "",
bandproductId:'', bandproductId: '',
isShowband:"", isShowband: "",
netPhone:"", netPhone: "",
isShowrh:"", isShowrh: "",
isRecv:"", isRecv: "",
chosePages:"", chosePages: "",
datePeriod: new Array(), datePeriod: new Array(),
greaterFifty: "", greaterFifty: "",
greaterHundred: "", greaterHundred: "",
...@@ -339,7 +370,7 @@ ...@@ -339,7 +370,7 @@
title: '手机卡办理', title: '手机卡办理',
value: 'sjkbl', value: 'sjkbl',
key: 'sjkbl', key: 'sjkbl',
},{ }, {
title: '套餐升级', title: '套餐升级',
value: 'tcsj', value: 'tcsj',
key: 'tcsj', key: 'tcsj',
...@@ -347,16 +378,16 @@ ...@@ -347,16 +378,16 @@
title: '手机卡套餐升级', title: '手机卡套餐升级',
value: 'status', value: 'status',
key: 'status', key: 'status',
},{ }, {
title: '毕业生宽带优惠', title: '毕业生宽带优惠',
value: 'bysrh', value: 'bysrh',
key: 'bysrh', key: 'bysrh',
},{ }, {
title: '5G升级会员包', title: '5G升级会员包',
value: 'sjktcsj', value: 'sjktcsj',
key: 'sjktcsj', key: 'sjktcsj',
}] }]
},{ }, {
title: '校园网办理', title: '校园网办理',
value: 'isShowband', value: 'isShowband',
key: 'isShowband', key: 'isShowband',
...@@ -380,7 +411,7 @@ ...@@ -380,7 +411,7 @@
disabled: true, disabled: true,
}, },
] ]
},{ }, {
title: '校园网提速', title: '校园网提速',
value: 'kdyBtn', value: 'kdyBtn',
key: 'kdyBtn', key: 'kdyBtn',
...@@ -392,10 +423,27 @@ ...@@ -392,10 +423,27 @@
disabled: true, disabled: true,
} }
] ]
},{ }, {
title: '优惠购机', title: '优惠购机',
value: 'isShowyhgj', value: 'isShowyhgj',
key: 'isShowyhgj', key: 'isShowyhgj',
},
{
title: '毕业生优惠',
value: 'bysyhBTN',
key: 'bysyhBTN',
children: [
{
title: '新用户办理',
value: 'sjkbl',
key: 'sjkbl',
},
{
title: '老用户优惠',
value: 'lyhyh',
key: 'lyhyh',
}
]
} }
], ],
}, },
...@@ -426,11 +474,11 @@ ...@@ -426,11 +474,11 @@
subNames: [], subNames: [],
schoolNames: [], schoolNames: [],
subNameList: [], subNameList: [],
packageName:[], packageName: [],
more: 6, more: 6,
package: [], package: [],
chosePages:[], chosePages: [],
products:[], products: [],
//输入框列表 //输入框列表
queryParam: { queryParam: {
networkName: '', networkName: '',
...@@ -478,7 +526,7 @@ ...@@ -478,7 +526,7 @@
totalCount: 0 totalCount: 0
} }
} else { } else {
if (res.data.records.length==0){ if (res.data.records.length == 0) {
return data return data
} }
data = { data = {
...@@ -487,21 +535,21 @@ ...@@ -487,21 +535,21 @@
pageNo: parameter.pageNo, pageNo: parameter.pageNo,
totalCount: res.data.total totalCount: res.data.total
} }
if (this.subNameList.length==0){ if (this.subNameList.length == 0) {
res.data.records[0].subNameList.forEach((key)=>{ res.data.records[0].subNameList.forEach((key) => {
this.subNameList.push(key.subNameList) this.subNameList.push(key.subNameList)
}) })
res.data.records[0].packageName.forEach((key)=>{ res.data.records[0].packageName.forEach((key) => {
let id=""+key.id let id = "" + key.id
let d={ let d = {
label: key.packageName, label: key.packageName,
value: id value: id
} }
this.packageName.push(d) this.packageName.push(d)
}) })
res.data.records[0].products.forEach((key)=>{ res.data.records[0].products.forEach((key) => {
let productId=""+key.productId let productId = "" + key.productId
let d={ let d = {
productId: productId, productId: productId,
ProductUniversity: key.ProductUniversity ProductUniversity: key.ProductUniversity
} }
...@@ -514,9 +562,8 @@ ...@@ -514,9 +562,8 @@
} }
} }
}, },
watch: { watch: {},
}, methods: {
methods:{
showMore() { showMore() {
this.isShowMore = false; this.isShowMore = false;
this.more = (this.packageName.length + 1); this.more = (this.packageName.length + 1);
...@@ -544,16 +591,19 @@ ...@@ -544,16 +591,19 @@
return v.toString(16); return v.toString(16);
}); });
}, },
baseuploadUrl(){ baseuploadUrl() {
const env = process.env.NODE_ENV; //获取当前环境 const env = process.env.NODE_ENV; //获取当前环境
let apis = "/"; let apis = "/";
if(env === 'development'){ //测试环境默认添加前缀 if (env === 'development') { //测试环境默认添加前缀
apis = '/api/'; apis = '/api/';
} }
return apis return apis
}, },
uploadUrl(){ uploadUrl() {
return this.baseuploadUrl() + this.brackgroundurl return this.baseuploadUrl() + this.brackgroundurl
},
uploadUrl2() {
return this.baseuploadUrl() + this.brackgroundurl2
} }
, ,
//背景图 //背景图
...@@ -565,23 +615,30 @@ ...@@ -565,23 +615,30 @@
this.previewVisible = true; this.previewVisible = true;
}, },
handleChange(obj) { handleChange(obj) {
if (this.fileList.length==2){ if (this.fileList.length == 2) {
this.fileList.splice(0,1) this.fileList.splice(0, 1)
}else{ } else {
this.fileList = obj.fileList; this.fileList = obj.fileList;
} }
}, },
delet(deletdata){ handleChange2(obj) {
let status=0; if (this.fileList2.length == 2) {
if(deletdata.status==0){ this.fileList2.splice(0, 1)
status=1 } else {
this.fileList2 = obj.fileList;
}
},
delet(deletdata) {
let status = 0;
if (deletdata.status == 0) {
status = 1
} }
let parent = { let parent = {
id: deletdata.id, id: deletdata.id,
status: status status: status
} }
hidestatus(parent).then(res=>{ hidestatus(parent).then(res => {
if (res.state=="success"){ if (res.state == "success") {
this.$message.success(res.data ? res.data : '修改成功!', 5); this.$message.success(res.data ? res.data : '修改成功!', 5);
this.search(); this.search();
return null return null
...@@ -589,12 +646,12 @@ ...@@ -589,12 +646,12 @@
this.$message.error(res.data ? res.data : '修改失败!', 5); this.$message.error(res.data ? res.data : '修改失败!', 5);
}) })
}, },
deleteSchool (deleteDate){ deleteSchool(deleteDate) {
let parent = { let parent = {
id: deleteDate.id, id: deleteDate.id,
} }
deleteSchoolById(parent).then(res =>{ deleteSchoolById(parent).then(res => {
if (res.state=="success"){ if (res.state == "success") {
this.$message.success(res.data ? res.data : '修改成功!', 5); this.$message.success(res.data ? res.data : '修改成功!', 5);
this.search(); this.search();
return null return null
...@@ -602,8 +659,8 @@ ...@@ -602,8 +659,8 @@
this.$message.error(res.data ? res.data : res.msg, 5); this.$message.error(res.data ? res.data : res.msg, 5);
}) })
}, },
chosePagesfunction(data){ chosePagesfunction(data) {
this.chosePages=data this.chosePages = data
}, },
search() { search() {
this.$refs.table.refresh({search: true}) this.$refs.table.refresh({search: true})
...@@ -623,8 +680,8 @@ ...@@ -623,8 +680,8 @@
this.impXXModal = false; this.impXXModal = false;
}, },
add(){ add() {
this.titleName="添加" this.titleName = "添加"
this.isShowMore = true; this.isShowMore = true;
this.more = 6; this.more = 6;
this.chosePages = []; this.chosePages = [];
...@@ -634,46 +691,53 @@ ...@@ -634,46 +691,53 @@
this.modifyForm.buttons = []; this.modifyForm.buttons = [];
this.modifyForm.appKey = ""; this.modifyForm.appKey = "";
this.modifyForm.appId = ""; this.modifyForm.appId = "";
setTimeout(()=>{ setTimeout(() => {
this.Formtable.setFieldsValue({ this.Formtable.setFieldsValue({
networkCode: '', networkCode: '',
networkName: '', networkName: '',
greaterFifty: "", greaterFifty: "",
greaterHundred: "", greaterHundred: "",
}) })
},0) }, 0)
this.buttons = []; this.buttons = [];
this.modifyvisible=true; this.modifyvisible = true;
const temp = []; const temp = [];
this.packageName.forEach(pName => { this.packageName.forEach(pName => {
temp.push(pName); temp.push(pName);
}) })
this.package = temp; this.package = temp;
}, },
modifyfunction(data){ modifyfunction(data) {
// 清空编辑选中内容 // 清空编辑选中内容
this.isShowMore = true; this.isShowMore = true;
this.fileList = [];
this.fileList2 = [];
this.more = 6; this.more = 6;
// 初始化按钮配置显示值 // 初始化按钮配置显示值
this.buttons = []; this.buttons = [];
// 初始化按钮配置选中值 // 初始化按钮配置选中值
this.modifyForm.buttons = []; this.modifyForm.buttons = [];
//初始化 //初始化
this.titleName="编辑学校" this.titleName = "编辑学校"
let choosepagespare={ let choosepagespare = {
id:data.id id: data.id
} }
this.fileid={ this.fileid = {
id:data.id id: data.id
} }
let url= ""; let url = "";
if (data.serviceQrcode != undefined) { if (data.serviceQrcode != undefined) {
url = this.baseuploadUrl()+"app/ciop"+data.serviceQrcode.replace("enclosure", ""); url = this.baseuploadUrl() + "app/ciop" + data.serviceQrcode.replace("enclosure", "");
}else{ } else {
url = this.baseuploadUrl()+"app/"; url = this.baseuploadUrl() + "app/";
}
if (data.packageQrcode != undefined) {
url = this.baseuploadUrl() + "app/ciop" + data.packageQrcode.replace("enclosure", "");
} else {
url = this.baseuploadUrl() + "app/";
} }
if (!(data.serviceQrcode == null || data.serviceQrcode=="")) { if (!(data.serviceQrcode == null || data.serviceQrcode == "")) {
//下载图片浏览 //下载图片浏览
this.fileList.push({ this.fileList.push({
uid: this.getuuid(), uid: this.getuuid(),
...@@ -682,7 +746,16 @@ ...@@ -682,7 +746,16 @@
url: url, url: url,
}) })
} }
this.modifyForm.id=data.id if (!(data.packageQrcode == null || data.packageQrcode == "")) {
//下载图片浏览
this.fileList2.push({
uid: this.getuuid(),
name: '找不到图片',
status: 'done',
url: url,
})
}
this.modifyForm.id = data.id
this.chosePages = []; this.chosePages = [];
const head = []; const head = [];
const temp = []; const temp = [];
...@@ -691,23 +764,23 @@ ...@@ -691,23 +764,23 @@
}) })
this.package = []; this.package = [];
//查询中间表 //查询中间表
choosepages(choosepagespare).then(res=>{ choosepages(choosepagespare).then(res => {
if (res.state == 'success'){ if (res.state == 'success') {
let d = res.data.choosepages let d = res.data.choosepages
for (let i = 0; i <d.length ; i++) { for (let i = 0; i < d.length; i++) {
this.chosePages.push(d[i]) this.chosePages.push(d[i])
for(let j = 0; j < temp.length; ++j) { for (let j = 0; j < temp.length; ++j) {
if (this.chosePages.indexOf(temp[j].value) != -1) { if (this.chosePages.indexOf(temp[j].value) != -1) {
head.push(temp[j]); head.push(temp[j]);
temp.splice(j,1); temp.splice(j, 1);
break; break;
} }
} }
} }
if (head.length == 0) { if (head.length == 0) {
this.package = this.packageName; this.package = this.packageName;
}else{ } else {
for(let i = 0; i < temp.length; ++i) { for (let i = 0; i < temp.length; ++i) {
head.push(temp[i]); head.push(temp[i]);
} }
this.package = head; this.package = head;
...@@ -719,7 +792,7 @@ ...@@ -719,7 +792,7 @@
this.modifyForm.datePeriod = []; this.modifyForm.datePeriod = [];
this.modifyForm.startDate = ""; this.modifyForm.startDate = "";
this.modifyForm.endDate = ""; this.modifyForm.endDate = "";
}else{ } else {
this.modifyForm.datePeriod = [moment(new Date(data.startDate)), moment(new Date(data.endDate))]; this.modifyForm.datePeriod = [moment(new Date(data.startDate)), moment(new Date(data.endDate))];
this.modifyForm.startDate = moment(new Date(data.startDate)).format("YYYY-MM-DD"); this.modifyForm.startDate = moment(new Date(data.startDate)).format("YYYY-MM-DD");
this.modifyForm.endDate = moment(new Date(data.endDate)).format("YYYY-MM-DD"); this.modifyForm.endDate = moment(new Date(data.endDate)).format("YYYY-MM-DD");
...@@ -728,7 +801,7 @@ ...@@ -728,7 +801,7 @@
if (data.isShowrh == 1) { if (data.isShowrh == 1) {
buttons.push({label: "高速校园网", value: "isShowrh"}); buttons.push({label: "高速校园网", value: "isShowrh"});
} }
if(data.isRecv == 1) { if (data.isRecv == 1) {
buttons.push({label: "是否已收到电信卡", value: "isRecv"}); buttons.push({label: "是否已收到电信卡", value: "isRecv"});
} }
if (data.isShowband == 1) { if (data.isShowband == 1) {
...@@ -740,6 +813,9 @@ ...@@ -740,6 +813,9 @@
if (data.sjkbl == 1) { if (data.sjkbl == 1) {
buttons.push({label: "手机卡办理", value: "sjkbl"}); buttons.push({label: "手机卡办理", value: "sjkbl"});
} }
if (data.lyhyh == 1) {
buttons.push({label: "老用户优惠", value: "lyhyh"});
}
if (data.tcsj == 1) { if (data.tcsj == 1) {
buttons.push({label: "套餐升级", value: "tcsj"}); buttons.push({label: "套餐升级", value: "tcsj"});
} }
...@@ -775,14 +851,14 @@ ...@@ -775,14 +851,14 @@
// 初始化选中值 // 初始化选中值
this.onTreeChange(this.buttons); this.onTreeChange(this.buttons);
setTimeout(()=>{ setTimeout(() => {
this.Formtable.setFieldsValue({ this.Formtable.setFieldsValue({
subName:data.subName, subName: data.subName,
schoolName:data.schoolName, schoolName: data.schoolName,
bandproductId:data.bandproductId, bandproductId: data.bandproductId,
netId:data.netId, netId: data.netId,
lzgh:data.lzgh, lzgh: data.lzgh,
lzUser:data.lzUser, lzUser: data.lzUser,
networkName: data.networkName, networkName: data.networkName,
networkCode: data.networkCode, networkCode: data.networkCode,
greaterFifty: data.greaterFifty, greaterFifty: data.greaterFifty,
...@@ -790,14 +866,14 @@ ...@@ -790,14 +866,14 @@
appKey: data.appKey, appKey: data.appKey,
appId: data.appId, appId: data.appId,
}) })
},50) }, 50)
this.customimg="./img/custom"+data.serviceQrcode this.customimg = "./img/custom" + data.serviceQrcode
this.modifyvisible=true; this.modifyvisible = true;
}, },
//提交表单 //提交表单
createfunctionOk(){ createfunctionOk() {
this.Formtable.validateFields(['networkCode','networkName','schoolName', 'bandproductId',"subName","lzgh","lzUser", 'netId',"isShowband", 'isShowrh',"netPhone" ,'isRecv','greaterFifty','greaterHundred', 'appId', 'appKey'], {force: true}, (err, values)=>{ this.Formtable.validateFields(['networkCode', 'networkName', 'schoolName', 'bandproductId', "subName", "lzgh", "lzUser", 'netId', "isShowband", 'isShowrh', "netPhone", 'isRecv', 'greaterFifty', 'greaterHundred', 'appId', 'appKey'], {force: true}, (err, values) => {
if (!err){ if (!err) {
this.modifyForm.networkCode = values.networkCode this.modifyForm.networkCode = values.networkCode
this.modifyForm.networkName = values.networkName == undefined ? "" : values.networkName this.modifyForm.networkName = values.networkName == undefined ? "" : values.networkName
this.modifyForm.subName = values.subName this.modifyForm.subName = values.subName
...@@ -814,8 +890,8 @@ ...@@ -814,8 +890,8 @@
this.modifyForm.appKey = values.appKey; this.modifyForm.appKey = values.appKey;
// 日期类型不传入后端 // 日期类型不传入后端
Vue.delete(this.modifyForm,'startDate'); Vue.delete(this.modifyForm, 'startDate');
Vue.delete(this.modifyForm,'endDate'); Vue.delete(this.modifyForm, 'endDate');
this.modifyForm.greaterFifty = values.greaterFifty == undefined ? "" : values.greaterFifty this.modifyForm.greaterFifty = values.greaterFifty == undefined ? "" : values.greaterFifty
this.modifyForm.greaterHundred = values.greaterHundred == undefined ? "" : values.greaterHundred this.modifyForm.greaterHundred = values.greaterHundred == undefined ? "" : values.greaterHundred
this.modifyForm.isShowrh = (this.modifyForm.buttons.indexOf("isShowrh") > -1) ? 1 : 0; this.modifyForm.isShowrh = (this.modifyForm.buttons.indexOf("isShowrh") > -1) ? 1 : 0;
...@@ -824,6 +900,7 @@ ...@@ -824,6 +900,7 @@
this.modifyForm.isRecv = (this.modifyForm.buttons.indexOf("isRecv") > -1) ? 1 : 0; this.modifyForm.isRecv = (this.modifyForm.buttons.indexOf("isRecv") > -1) ? 1 : 0;
this.modifyForm.sjkbl = (this.modifyForm.buttons.indexOf("sjkbl") > -1) ? 1 : 0; this.modifyForm.sjkbl = (this.modifyForm.buttons.indexOf("sjkbl") > -1) ? 1 : 0;
this.modifyForm.lyhyh = (this.modifyForm.buttons.indexOf("lyhyh") > -1) ? 1 : 0;
this.modifyForm.tcsj = (this.modifyForm.buttons.indexOf("tcsj") > -1) ? 1 : 0; this.modifyForm.tcsj = (this.modifyForm.buttons.indexOf("tcsj") > -1) ? 1 : 0;
this.modifyForm.sjktcsj = (this.modifyForm.buttons.indexOf("sjktcsj") > -1) ? 1 : 0; this.modifyForm.sjktcsj = (this.modifyForm.buttons.indexOf("sjktcsj") > -1) ? 1 : 0;
this.modifyForm.bysrh = (this.modifyForm.buttons.indexOf("bysrh") > -1) ? 1 : 0; this.modifyForm.bysrh = (this.modifyForm.buttons.indexOf("bysrh") > -1) ? 1 : 0;
...@@ -838,22 +915,22 @@ ...@@ -838,22 +915,22 @@
this.modifyForm.udBtn = (this.modifyForm.buttons.indexOf("udBtn") > -1) ? 1 : 0; this.modifyForm.udBtn = (this.modifyForm.buttons.indexOf("udBtn") > -1) ? 1 : 0;
this.chosePages.forEach(value => { this.chosePages.forEach(value => {
if (value!=undefined && this.modifyForm.chosePages.indexOf(value) == -1){ if (value != undefined && this.modifyForm.chosePages.indexOf(value) == -1) {
this.modifyForm.chosePages=value+","+this.modifyForm.chosePages this.modifyForm.chosePages = value + "," + this.modifyForm.chosePages
} }
}) })
//插入数据 //插入数据
if (this.modifyForm.id==""){ if (this.modifyForm.id == "") {
for (let key in this.modifyForm) { for (let key in this.modifyForm) {
if (this.modifyForm[key]==undefined){ if (this.modifyForm[key] == undefined) {
this.modifyForm[key]="" this.modifyForm[key] = ""
} }
} }
insert(this.modifyForm).then(res=>{ insert(this.modifyForm).then(res => {
if (res.state=="success") { if (res.state == "success") {
this.$message.success(res.data ? res.data : '添加成功!', 5); this.$message.success(res.data ? res.data : '添加成功!', 5);
this.search(); this.search();
this.modifyvisible=false this.modifyvisible = false
return null; return null;
} }
this.$message.error(res.data ? res.data : '添加失败!', 5); this.$message.error(res.data ? res.data : '添加失败!', 5);
...@@ -861,11 +938,11 @@ ...@@ -861,11 +938,11 @@
return null; return null;
} }
//修改数据 //修改数据
modify(this.modifyForm).then(res=>{ modify(this.modifyForm).then(res => {
if (res.state=="success") { if (res.state == "success") {
this.$message.success(res.data ? res.data : '修改成功!', 5); this.$message.success(res.data ? res.data : '修改成功!', 5);
this.search(); this.search();
this.modifyvisible=false; this.modifyvisible = false;
return null; return null;
} }
this.$message.error(res.data ? res.data : '修改失败!', 5); this.$message.error(res.data ? res.data : '修改失败!', 5);
...@@ -874,27 +951,28 @@ ...@@ -874,27 +951,28 @@
}) })
}, },
createfunctionCancel(){ createfunctionCancel() {
this.Formtable.setFieldsValue({ this.Formtable.setFieldsValue({
subName:"", subName: "",
schoolName:"", schoolName: "",
netId:"", netId: "",
lzgh:"", lzgh: "",
lzUser:"", lzUser: "",
bandproductId:"", bandproductId: "",
isShowband:"", isShowband: "",
netPhone:"", netPhone: "",
isShowrh:"", isShowrh: "",
isRecv:"", isRecv: "",
greaterFifty: '', greaterFifty: '',
greaterHundred: '' greaterHundred: ''
}) })
this.fileList=[] this.fileList = []
this.modifyForm.id="" this.fileList2 = []
this.modifyForm.chosePages="" this.modifyForm.id = ""
this.modifyForm.chosePages = ""
this.modifyForm.datePeriod = []; this.modifyForm.datePeriod = [];
this.chosePages = []; this.chosePages = [];
this.modifyvisible=false; this.modifyvisible = false;
}, },
getSchoolNames() { getSchoolNames() {
this.schoolNames = [] this.schoolNames = []
...@@ -939,7 +1017,7 @@ ...@@ -939,7 +1017,7 @@
this.downloadstatu this.downloadstatu
); );
}, },
downloadXXMoBan:function (){ downloadXXMoBan: function () {
exportFile(excelMBOut(), "学校列表模板.xlsx"); exportFile(excelMBOut(), "学校列表模板.xlsx");
}, },
downloadstatu() { downloadstatu() {
...@@ -951,7 +1029,7 @@ ...@@ -951,7 +1029,7 @@
this.impXXModal = false; this.impXXModal = false;
this.clearmodel(); this.clearmodel();
}, },
imp(){ imp() {
this.handleSubmit1(); this.handleSubmit1();
}, },
clearmodel() { clearmodel() {
......
...@@ -424,7 +424,7 @@ ...@@ -424,7 +424,7 @@
} }
/deep/ .ant-form-item { /deep/ .ant-form-item {
margin-bottom: 24vw / @vw; margin-bottom: 12vw / @vw;
} }
@media (min-width: 1920px) { @media (min-width: 1920px) {
...@@ -448,7 +448,7 @@ ...@@ -448,7 +448,7 @@
/deep/ .user-layout-login div .ant-input { /deep/ .user-layout-login div .ant-input {
width: 100%; width: 100%;
height: 68vw / @vw; height: 58vw / @vw;
margin-bottom: 15vw / @vw; margin-bottom: 15vw / @vw;
padding-left: 44vw / @vw; padding-left: 44vw / @vw;
background: rgba(245, 245, 245, 1); background: rgba(245, 245, 245, 1);
......
...@@ -35,14 +35,35 @@ ...@@ -35,14 +35,35 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="10"> <a-col :span="10">
<j-graphic-code @success="generateCode" style="float: right"></j-graphic-code>
</a-col>
</a-row>
<a-row :gutter="0">
<a-col :span="14">
<a-form-item>
<a-input
v-decorator="['phoneCode',validatorRules.phoneCode]"
size="large"
type="text"
placeholder="请输入验证码">
<a-icon
slot="prefix"
v-if=" inputCodeContent==verifiedCode "
type="smile"
:style="{ color: 'rgba(0,0,0,.25)' }"/>
<a-icon slot="prefix" v-else type="frown" :style="{ color: 'rgba(0,0,0,.25)' }"/>
</a-input>
</a-form-item>
</a-col>
<a-col :span="10">
<a-button <a-button
size="small" size="small"
type="primary" type="primary"
htmlType="submit" htmlType="submit"
class="code-button" class="code-button"
:loading="loginBtn"
@click.stop.prevent="getCode" @click.stop.prevent="getCode"
:disabled="loginBtn">{{codeMsg}} :disabled="!loginBtn">{{codeMsg}}
</a-button> </a-button>
<!-- <j-graphic-code @success="generateCode" style="float: right"></j-graphic-code>--> <!-- <j-graphic-code @success="generateCode" style="float: right"></j-graphic-code>-->
</a-col> </a-col>
...@@ -54,7 +75,7 @@ ...@@ -54,7 +75,7 @@
size="large" size="large"
type="password" type="password"
autocomplete="false" autocomplete="false"
placeholder="新密码(6-12位数字和字母组合)"> placeholder="新密码(6-12位数字+字母+字符组合)">
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/> <a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
</a-input> </a-input>
</a-form-item> </a-form-item>
...@@ -76,9 +97,8 @@ ...@@ -76,9 +97,8 @@
type="primary" type="primary"
htmlType="submit" htmlType="submit"
class="login-button" class="login-button"
:loading="loginBtn"
@click.stop.prevent="handleSubmit" @click.stop.prevent="handleSubmit"
:disabled="loginBtn">确定 :disabled="!loginBtn">确定
</a-button> </a-button>
</a-form> </a-form>
...@@ -144,6 +164,7 @@ export default { ...@@ -144,6 +164,7 @@ export default {
created() { created() {
Vue.ls.remove(ACCESS_TOKEN) Vue.ls.remove(ACCESS_TOKEN)
this.getRouterData(); this.getRouterData();
console.log(this.loginBtn)
}, },
methods: { methods: {
// handler // handler
...@@ -160,6 +181,10 @@ export default { ...@@ -160,6 +181,10 @@ export default {
this.customActiveKey = key this.customActiveKey = key
// this.form.resetFields() // this.form.resetFields()
}, },
generateCode(value) {
this.loginBtn = false;
this.verifiedCode = value.toLowerCase()
},
getCode(){ getCode(){
// 验证码60秒倒计时 // 验证码60秒倒计时
if (!this.timer) { if (!this.timer) {
...@@ -194,6 +219,8 @@ export default { ...@@ -194,6 +219,8 @@ export default {
} }
}, },
handleSubmit() { handleSubmit() {
var space=/\s/;// 判断必须非空格
let that = this let that = this
let loginParams = { let loginParams = {
...@@ -204,15 +231,24 @@ export default { ...@@ -204,15 +231,24 @@ export default {
verificationCode:"", verificationCode:"",
newPwd:"", newPwd:"",
rePwd:'' rePwd:''
} };
// 确定修改密码 // 确定修改密码
that.form.validateFields(['username', 'password', 'password2', 'inputCode'], {force: true}, (err, values) => { that.form.validateFields(['username', 'password', 'password2', 'phoneCode'], {force: true}, (err, values) => {
if(this.getLvl(values.password)){
this.registerRrror("密码需为6-12位字母+数字+字符组合")
return null;
}
if (/\s/.test(values.password)){
this.registerRrror("密码不能存在空格")
return null;
}
if (!err) { if (!err) {
values.password = encodeURIComponent(this.getPass(values.password)); values.password = encodeURIComponent(this.getPass(values.password));
values.password2 = encodeURIComponent(this.getPass(values.password2)); values.password2 = encodeURIComponent(this.getPass(values.password2));
let data = { let data = {
account: values.username, account: values.username,
verificationCode: values.inputCode, verificationCode: values.phoneCode,
newPwd: values.password, newPwd: values.password,
rePwd: values.password rePwd: values.password
} }
...@@ -227,6 +263,21 @@ export default { ...@@ -227,6 +263,21 @@ export default {
}) })
}, },
getLvl(pwd) {
let lvl = 0;//默认是0级别
//密码中是否有数字,或者是字母,或者是特殊符号
if(/[0-9]/.test(pwd)){//如果有数字返回true,就让级别++变成1级了
lvl++;
}
if(/[a-zA-Z]/.test(pwd)){
lvl++;
}
if(/[^0-9a-zA-Z_]/.test(pwd)){
lvl++;
}
return lvl !== 3
},
requestFailed(err) { requestFailed(err) {
this.$notification['error']({ this.$notification['error']({
message: '登录失败', message: '登录失败',
...@@ -260,9 +311,6 @@ export default { ...@@ -260,9 +311,6 @@ export default {
callback("您输入的验证码不正确!"); callback("您输入的验证码不正确!");
} }
}, },
inputCodeChange(e) {
},
getRouterData() { getRouterData() {
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue({ this.form.setFieldsValue({
...@@ -270,6 +318,30 @@ export default { ...@@ -270,6 +318,30 @@ export default {
}); });
}) })
}, },
inputCodeChange(e) {
this.inputCodeContent = e.target.value
if (!e.target.value || 0 == e.target.value) {
this.inputCodeNull = true
} else {
this.inputCodeContent = this.inputCodeContent.toLowerCase()
this.inputCodeNull = false
}
if (this.verifiedCode == this.inputCodeContent) {
this.form.validateFields(['username'], {force: true}, (err, values) => {
if (!err && this.countdown == 0) {
clearInterval(this.timer);
this.codeMsg = "获取验证码";
this.countdown = 60;
this.timer = null;
this.formLogin.username = values.username
this.getCode()
}
console.log(123)
this.loginBtn = true
})
}
},
validateToNextPassword (rule, value, callback) { validateToNextPassword (rule, value, callback) {
const form = this.form; const form = this.form;
if (value!= form.getFieldValue("password")) { if (value!= form.getFieldValue("password")) {
...@@ -314,7 +386,7 @@ export default { ...@@ -314,7 +386,7 @@ export default {
width: calc(100% - 666vw/@vw); width: calc(100% - 666vw/@vw);
height: 792vw/@vw; height: 792vw/@vw;
box-sizing: border-box; box-sizing: border-box;
padding:80vw/@vw 80vw/@vw 0 60vw/@vw; padding:0 80vw/@vw 0 60vw/@vw;
float:left; float:left;
.form_title{ .form_title{
font-size:40vw/@vw; font-size:40vw/@vw;
...@@ -327,7 +399,7 @@ export default { ...@@ -327,7 +399,7 @@ export default {
border-bottom: 6vw/@vw solid #57bbff; border-bottom: 6vw/@vw solid #57bbff;
} }
/deep/ .ant-form-item{ /deep/ .ant-form-item{
margin-bottom: 24vw/@vw; margin-bottom: 12vw/@vw;
} }
@media (min-width: 1920px) { @media (min-width: 1920px) {
/deep/.ant-input-affix-wrapper .ant-input-prefix{ /deep/.ant-input-affix-wrapper .ant-input-prefix{
......
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