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>
......
...@@ -49,10 +49,11 @@ ...@@ -49,10 +49,11 @@
</span> </span>
</a-row> </a-row>
</a-form> </a-form>
</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']">
...@@ -114,65 +118,65 @@ ...@@ -114,65 +118,65 @@
<a-input placeholder="揽装工号(宽带)" v-decorator="[ 'lzgh' ]"></a-input> <a-input placeholder="揽装工号(宽带)" v-decorator="[ 'lzgh' ]"></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-input placeholder="揽装人(宽带)" v-decorator="[ 'lzUser' ]"></a-input> <a-input placeholder="揽装人(宽带)" v-decorator="[ 'lzUser' ]"></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-input placeholder="网点编码" v-decorator="[ 'networkCode' ]"></a-input> <a-input placeholder="网点编码" v-decorator="[ 'networkCode' ]"></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-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
show-search show-search
v-model="buttons" v-model="buttons"
style="width: 100%" style="width: 100%"
:tree-data="treeData" :tree-data="treeData"
placeholder="请选择按钮配置" placeholder="请选择按钮配置"
allow-clear allow-clear
tree-checkable tree-checkable
:show-checked-strategy="SHOW_PARENT" :show-checked-strategy="SHOW_PARENT"
multiple multiple
:treeCheckStrictly=treeCheckStrictly :treeCheckStrictly=treeCheckStrictly
tree-default-expand-all tree-default-expand-all
@change="onTreeChange" @change="onTreeChange"
> >
</a-tree-select> </a-tree-select>
</template> </template>
</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="[ 'appId' ]"></a-input> <a-input placeholder="随身厅终端编码" v-decorator="[ 'appId' ]"></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-input placeholder="随身厅终端密匙" v-decorator="[ 'appKey' ]"></a-input> <a-input placeholder="随身厅终端密匙" v-decorator="[ 'appKey' ]"></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-upload <a-upload
...@@ -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>
</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="老用户升级套餐二维码">
<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> </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-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>
...@@ -207,65 +236,66 @@ ...@@ -207,65 +236,66 @@
</a-form> </a-form>
</a-modal> </a-modal>
<a-modal <a-modal
title="批量导入" title="批量导入"
:visible="impXXModal" :visible="impXXModal"
@ok="impOk" @ok="impOk"
@cancel="impCancel" @cancel="impCancel"
html-type="submit" html-type="submit"
width="400px" width="400px"
> >
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="24" :sm="12"> <a-col :md="24" :sm="12">
<p style="text-align:center">{{ importTile }}</p> <p style="text-align:center">{{ importTile }}</p>
</a-col> </a-col>
</a-row> </a-row>
<import-btn :url="importUrl" :responseFun="doPush"> <import-btn :url="importUrl" :responseFun="doPush">
<a-tooltip placement="topLeft" title="导入文件" arrowPointAtCenter> <a-tooltip placement="topLeft" title="导入文件" arrowPointAtCenter>
<a-row :gutter="24">
<a-col :md="24" :sm="12">
<p>
选择文件:
<a-button type="primary">选择文件</a-button>
</p>
</a-col>
</a-row>
</a-tooltip>
</import-btn>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="24" :sm="12"> <a-col :md="24" :sm="12">
<p> <p v-show="yrymXXmoBan">
选择文件 模板下载
<a-button type="primary">选择文件</a-button> <a-button type="primary" @click="downloadXXMoBan">学校导出模板</a-button>
</p> </p>
</a-col> </a-col>
</a-row> </a-row>
</a-tooltip> <a-row :gutter="24" :v-show="yrymXXmoBan">
</import-btn> <a-col :md="24" :sm="12">
<a-row :gutter="24"> <p>说明:</p>
<a-col :md="24" :sm="12"> <p>1.批量导入请严格按照模版进行导入;</p>
<p v-show="yrymXXmoBan"> </a-col>
模板下载: </a-row>
<a-button type="primary" @click="downloadXXMoBan">学校导出模板</a-button> </a-modal>
</p>
</a-col>
</a-row>
<a-row :gutter="24" :v-show="yrymXXmoBan">
<a-col :md="24" :sm="12">
<p>说明:</p>
<p>1.批量导入请严格按照模版进行导入;</p>
</a-col>
</a-row>
</a-modal>
</div> </div>
</template> </template>
<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,
reportDownload, reportDownload,
findByList, findByList,
choosepages, choosepages,
modify, modify,
insert, insert,
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: "",
...@@ -329,108 +360,125 @@ ...@@ -329,108 +360,125 @@
appId: "" appId: ""
}, },
treeData: [ treeData: [
{ {
title: '首页按钮', title: '首页按钮',
value: 'indexButton', value: 'indexButton',
key: 'indexButton', key: 'indexButton',
disabled: true, disabled: true,
children: [
{
title: '手机卡办理',
value: 'sjkbl',
key: 'sjkbl',
},{
title: '套餐升级',
value: 'tcsj',
key: 'tcsj',
children: [{
title: '手机卡套餐升级',
value: 'status',
key: 'status',
},{
title: '毕业生宽带优惠',
value: 'bysrh',
key: 'bysrh',
},{
title: '5G升级会员包',
value: 'sjktcsj',
key: 'sjktcsj',
}]
},{
title: '校园网办理',
value: 'isShowband',
key: 'isShowband',
children: [ children: [
{ {
title: '普通校园网', title: '手机卡办理',
value: 'kdsl', value: 'sjkbl',
key: 'kdsl', key: 'sjkbl',
disabled: true, }, {
}, title: '套餐升级',
{ value: 'tcsj',
title: '高速校园网', key: 'tcsj',
value: 'isShowrh', children: [{
key: 'isShowrh', title: '手机卡套餐升级',
disabled: true, value: 'status',
}, key: 'status',
{ }, {
title: '是否甩单', title: '毕业生宽带优惠',
value: 'jiltKd', value: 'bysrh',
key: 'jiltKd', key: 'bysrh',
disabled: true, }, {
}, title: '5G升级会员包',
] value: 'sjktcsj',
},{ key: 'sjktcsj',
title: '校园网提速', }]
value: 'kdyBtn', }, {
key: 'kdyBtn', title: '校园网办理',
value: 'isShowband',
key: 'isShowband',
children: [
{
title: '普通校园网',
value: 'kdsl',
key: 'kdsl',
disabled: true,
},
{
title: '高速校园网',
value: 'isShowrh',
key: 'isShowrh',
disabled: true,
},
{
title: '是否甩单',
value: 'jiltKd',
key: 'jiltKd',
disabled: true,
},
]
}, {
title: '校园网提速',
value: 'kdyBtn',
key: 'kdyBtn',
children: [
{
title: '是否甩单',
value: 'jiltKdy',
key: 'jiltKdy',
disabled: true,
}
]
}, {
title: '优惠购机',
value: 'isShowyhgj',
key: 'isShowyhgj',
},
{
title: '毕业生优惠',
value: 'bysyhBTN',
key: 'bysyhBTN',
children: [
{
title: '新用户办理',
value: 'sjkbl',
key: 'sjkbl',
},
{
title: '老用户优惠',
value: 'lyhyh',
key: 'lyhyh',
}
]
}
],
},
{
title: '流程按钮',
value: 'processButton',
key: 'processButton',
disabled: true,
children: [ children: [
{ {
title: '是否甩单', title: '0息购机',
value: 'jiltKdy', value: 'netPhone',
key: 'jiltKdy', key: 'netPhone',
disabled: true, },
} {
] title: '线上线下',
},{ value: 'udBtn',
title: '优惠购机', key: 'udBtn',
value: 'isShowyhgj', },
key: 'isShowyhgj', {
} title: '是否已收到电信卡',
], value: 'isRecv',
}, key: 'isRecv',
{ },
title: '流程按钮', ],
value: 'processButton', },
key: 'processButton',
disabled: true,
children: [
{
title: '0息购机',
value: 'netPhone',
key: 'netPhone',
},
{
title: '线上线下',
value: 'udBtn',
key: 'udBtn',
},
{
title: '是否已收到电信卡',
value: 'isRecv',
key: 'isRecv',
},
],
},
], ],
subNames: [], subNames: [],
schoolNames: [], schoolNames: [],
subNameList: [], subNameList: [],
packageName:[], packageName: [],
more: 6, more: 6,
package: [], package: [],
chosePages:[], chosePages: [],
products:[], products: [],
//输入框列表 //输入框列表
queryParam: { queryParam: {
networkName: '', networkName: '',
...@@ -466,7 +514,7 @@ ...@@ -466,7 +514,7 @@
//表示 //表示
let obj = cloneObject(this.queryParam) let obj = cloneObject(this.queryParam)
return findByList(Object.assign(params, obj)).then(res => { return findByList(Object.assign(params, obj)).then(res => {
console.log(res); console.log(res);
let data = {}; let data = {};
if (res.state !== 'success') { if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!' this.emptyText.emptyText = '查询失败!'
...@@ -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,28 +562,27 @@ ...@@ -514,28 +562,27 @@
} }
} }
}, },
watch: { watch: {},
}, methods: {
methods:{
showMore() { showMore() {
this.isShowMore = false; this.isShowMore = false;
this.more = (this.packageName.length + 1); this.more = (this.packageName.length + 1);
}, },
hideMore() { hideMore() {
this.isShowMore = true; this.isShowMore = true;
this.more = 6; this.more = 6;
}, },
onTreeChange(value) { onTreeChange(value) {
const values = []; const values = [];
value.forEach(v => { value.forEach(v => {
values.push(v.value); values.push(v.value);
}) })
this.modifyForm.buttons = values this.modifyForm.buttons = values
}, },
changeStartDate(dates, dateString) { changeStartDate(dates, dateString) {
this.modifyForm.datePeriod = dates; this.modifyForm.datePeriod = dates;
this.modifyForm.startDate = dateString[0]; this.modifyForm.startDate = dateString[0];
this.modifyForm.endDate = dateString[1]; this.modifyForm.endDate = dateString[1];
}, },
getuuid() { getuuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
...@@ -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,29 +659,29 @@ ...@@ -602,29 +659,29 @@
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})
}, },
// 执行上传 // 执行上传
doPush(res) { doPush(res) {
if (!res || !res.response) { if (!res || !res.response) {
this.$message.error("上传文件出错!", 10); this.$message.error("上传文件出错!", 10);
return false; return false;
} }
const response = res.response; const response = res.response;
if (response.state !== "success") { if (response.state !== "success") {
this.$message.error(response.msg ? response.msg : "上传文件出错!", 10); this.$message.error(response.msg ? response.msg : "上传文件出错!", 10);
return false; return false;
} }
this.$message.success("上传成功!" + response.data, 5); this.$message.success("上传成功!" + response.data, 5);
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,24 +764,24 @@ ...@@ -691,24 +764,24 @@
}) })
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) {
...@@ -738,51 +811,54 @@ ...@@ -738,51 +811,54 @@
buttons.push({label: "0息购机", value: "netPhone"}); buttons.push({label: "0息购机", value: "netPhone"});
} }
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"});
} }
if (data.status == 1) { if (data.status == 1) {
buttons.push({label: "手机卡套餐升级", value: "status"}); buttons.push({label: "手机卡套餐升级", value: "status"});
} }
if (data.bysrh == 1) { if (data.bysrh == 1) {
buttons.push({label: "毕业生宽带优惠", value: "bysrh"}); buttons.push({label: "毕业生宽带优惠", value: "bysrh"});
} }
if (data.sjktcsj == 1) { if (data.sjktcsj == 1) {
buttons.push({label: "5G加装包", value: "sjktcsj"}); buttons.push({label: "5G加装包", value: "sjktcsj"});
} }
if (data.kdsl == 1) { if (data.kdsl == 1) {
buttons.push({label: "普通校园网", value: "kdsl"}); buttons.push({label: "普通校园网", value: "kdsl"});
} }
if (data.jiltKd == 1) { if (data.jiltKd == 1) {
buttons.push({label: "是否甩单", value: "jiltKd"}); buttons.push({label: "是否甩单", value: "jiltKd"});
} }
if (data.kdyBtn == 1) { if (data.kdyBtn == 1) {
buttons.push({label: "校园网提速", value: "kdyBtn"}); buttons.push({label: "校园网提速", value: "kdyBtn"});
} }
if (data.jiltKdy == 1) { if (data.jiltKdy == 1) {
buttons.push({label: "是否甩单", value: "jiltKdy"}); buttons.push({label: "是否甩单", value: "jiltKdy"});
} }
if (data.isShowyhgj == 1) { if (data.isShowyhgj == 1) {
buttons.push({label: "优惠购机", value: "isShowyhgj"}); buttons.push({label: "优惠购机", value: "isShowyhgj"});
} }
if (data.udBtn == 1) { if (data.udBtn == 1) {
buttons.push({label: "线上线下", value: "udBtn"}); buttons.push({label: "线上线下", value: "udBtn"});
} }
this.buttons = buttons; this.buttons = buttons;
// 初始化选中值 // 初始化选中值
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 = []
...@@ -929,49 +1007,49 @@ ...@@ -929,49 +1007,49 @@
}) })
}, },
excelOut() { excelOut() {
this.callback = true; this.callback = true;
let today = new Date(); let today = new Date();
today.setTime(today.getTime()); today.setTime(today.getTime());
let s2 = today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate(); let s2 = today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate();
exportFile( exportFile(
reportDownload(this.queryParam), reportDownload(this.queryParam),
"校园信息列表" + s2 + ".xlsx", "校园信息列表" + s2 + ".xlsx",
this.downloadstatu this.downloadstatu
); );
}, },
downloadXXMoBan:function (){ downloadXXMoBan: function () {
exportFile(excelMBOut(), "学校列表模板.xlsx"); exportFile(excelMBOut(), "学校列表模板.xlsx");
}, },
downloadstatu() { downloadstatu() {
this.callback = false; this.callback = false;
}, },
impOk() { impOk() {
}, },
impCancel() { impCancel() {
this.impXXModal = false; this.impXXModal = false;
this.clearmodel(); this.clearmodel();
}, },
imp(){ imp() {
this.handleSubmit1(); this.handleSubmit1();
}, },
clearmodel() { clearmodel() {
this.importTile = ""; this.importTile = "";
this.yrymXXmoBan = false; this.yrymXXmoBan = false;
this.importUrl = ""; this.importUrl = "";
}, },
handleSubmit1() { handleSubmit1() {
this.importTile = "学校导入"; this.importTile = "学校导入";
this.yrymXXmoBan = true; this.yrymXXmoBan = true;
this.importUrl = "manager/ciop/school/schoolManagement/importDate"; this.importUrl = "manager/ciop/school/schoolManagement/importDate";
this.impXXModal = true; this.impXXModal = true;
}, },
}, },
mounted() { mounted() {
this.initSubstName(); this.initSubstName();
this.getSchoolNames(); this.getSchoolNames();
}, },
} }
</script> </script>
<style scoped> <style scoped>
......
...@@ -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