修改bug
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<template v-if="!isNoTitle" slot="title">
|
||||
<a-row class="j-modal-title-row" type="flex">
|
||||
<a-col class="left">
|
||||
<slot name="title">{{ title }}</slot>
|
||||
<slot name="title">{{ title + 'jjjj' }}</slot>
|
||||
</a-col>
|
||||
<a-col v-if="switchFullscreen" class="right" @click="toggleFullscreen">
|
||||
<a-button class="ant-modal-close ant-modal-close-x" ghost type="link" :icon="fullscreenButtonIcon"/>
|
||||
@@ -189,7 +189,8 @@ export default {
|
||||
|
||||
& .ant-modal-body {
|
||||
/* title 和 footer 各占 55px */
|
||||
height: calc(100% - 55px - 55px);
|
||||
height: 500px !important;
|
||||
background-color: pink;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
@@ -231,6 +232,9 @@ export default {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
.ant-modal-body{
|
||||
height:500px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
|
||||
@@ -188,7 +188,7 @@ export default {
|
||||
|
||||
& .ant-modal-body {
|
||||
/* title 和 footer 各占 55px */
|
||||
height: calc(100% - 55px - 55px);
|
||||
height: calc(80% - 55px - 55px);
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ let importModalLoading
|
||||
export const JeroListMixin = {
|
||||
data () {
|
||||
return {
|
||||
uploading: false,
|
||||
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
|
||||
queryParam: {},
|
||||
/* 数据源 */
|
||||
@@ -314,73 +315,90 @@ export const JeroListMixin = {
|
||||
modalLoading.destroy()
|
||||
})
|
||||
},
|
||||
//导入前
|
||||
beforeUpload( file) {
|
||||
// console.log(file,"jjjj")
|
||||
if (file.size > 20 * 1024 * 1024) {
|
||||
this.uploading = true
|
||||
this.$message.warning('最大上传20M')
|
||||
return false
|
||||
}
|
||||
this.uploading = false
|
||||
return true
|
||||
},
|
||||
/* 导入 */
|
||||
handleImportExcel (info) {
|
||||
// 加一个大的提示
|
||||
if (!this.loading) {
|
||||
importModalLoading = this.$info({
|
||||
title: '提示',
|
||||
content: <span>正在导入,请稍候 <a-spin size="small"/></span>,
|
||||
keyboard: false
|
||||
if (!this.uploading) {
|
||||
if (!this.loading) {
|
||||
importModalLoading = this.$info({
|
||||
title: '提示',
|
||||
content: <span>正在导入,请稍候 <a-spin size="small" /></span>,
|
||||
keyboard: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
this.loading = true
|
||||
// 把知道了这个按钮去掉
|
||||
this.$nextTick(() => {
|
||||
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||
})
|
||||
}
|
||||
this.loading = true
|
||||
// 把知道了这个按钮去掉
|
||||
this.$nextTick(() => {
|
||||
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||
})
|
||||
if (info.file.status !== 'uploading') {
|
||||
console.log(info.file, info.fileList)
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
// 销毁这个提示
|
||||
importModalLoading && importModalLoading.destroy()
|
||||
this.loading = false
|
||||
if (info.file.response.success) {
|
||||
// this.$message.success(`${info.file.name} 文件上传成功`);
|
||||
if (info.file.response.code === 201) {
|
||||
const { message, result: { msg, fileUrl, fileName } } = info.file.response
|
||||
const href = window._CONFIG.domianURL + fileUrl
|
||||
this.$warning({
|
||||
title: message,
|
||||
content: (<div>
|
||||
<span>{msg}</span><br/>
|
||||
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
if (info.file.status !== 'uploading') {
|
||||
console.log(info.file, info.fileList)
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
// 销毁这个提示
|
||||
importModalLoading && importModalLoading.destroy()
|
||||
this.loading = false
|
||||
if (info.file.response.success) {
|
||||
// this.$message.success(`${info.file.name} 文件上传成功`);
|
||||
if (info.file.response.code === 201) {
|
||||
const { message, result: { msg, fileUrl, fileName } } = info.file.response
|
||||
const href = window._CONFIG.domianURL + fileUrl
|
||||
this.$warning({
|
||||
title: message,
|
||||
content: (<div>
|
||||
<span>{msg}</span><br />
|
||||
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
} else {
|
||||
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
|
||||
}
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
|
||||
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
|
||||
}
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
|
||||
}
|
||||
} else if (info.file.status === 'error') {
|
||||
// 销毁这个提示
|
||||
importModalLoading && importModalLoading.destroy()
|
||||
this.loading = false
|
||||
if (info.file.response.status === 500) {
|
||||
const data = info.file.response
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
if (token && data.message.includes('Token失效')) {
|
||||
this.error({
|
||||
title: '登录已过期',
|
||||
content: '很抱歉,登录已过期,请重新登录',
|
||||
okText: '重新登录',
|
||||
mask: false,
|
||||
onOk: () => {
|
||||
store.dispatch('Logout').then(() => {
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
window.location.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (info.file.status === 'error') {
|
||||
// 销毁这个提示
|
||||
importModalLoading && importModalLoading.destroy()
|
||||
this.loading = false
|
||||
|
||||
if (info.file.response.status === 500) {
|
||||
const data = info.file.response
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
if (token && data.message.includes('Token失效')) {
|
||||
this.error({
|
||||
title: '登录已过期',
|
||||
content: '很抱歉,登录已过期,请重新登录',
|
||||
okText: '重新登录',
|
||||
mask: false,
|
||||
onOk: () => {
|
||||
store.dispatch('Logout').then(() => {
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
window.location.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error(`文件上传失败: ${info.file.msg} `)
|
||||
}
|
||||
} else {
|
||||
this.$message.error(`文件上传失败: ${info.file.msg} `)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
/* 图片预览 */
|
||||
getImgView (text) {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="plus" @click="onetomany">一对多</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('单表示例')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<!-- 高级查询区域 -->
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('一对多示例')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" v-show="show" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" v-show="show" icon="download" @click="handleExportXls('消息')">导出</a-button>
|
||||
<a-upload v-show="show" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
|
||||
<a-upload v-show="show" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" :before-upload='beforeUpload'
|
||||
@change="handleImportExcel">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('消息模板')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
|
||||
@change="handleImportExcel">
|
||||
@change="handleImportExcel" :before-upload='beforeUpload' accept='.xls,xlsx'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<a-button @click="handleAdd(1)" type="primary">添加部门</a-button>
|
||||
<a-button @click="handleAdd(2)" type="primary">添加下级</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<a-button @click="handleAdd(1)" type="primary">添加部门</a-button>
|
||||
<a-button @click="handleAdd(2)" type="primary">添加下级</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<j-third-app-button biz-type="depart" :selected-row-keys="selectedRowKeys" syncToApp @sync-finally="onSyncFinally"/>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'sys:dict:operation'">添加</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('字典信息')" v-has="'sys:dict:operation'">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" v-has="'sys:dict:operation'">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :before-upload='beforeUpload' :action="importExcelUrl" @change="handleImportExcel" v-has="'sys:dict:operation'">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="sync" @click="refleshCache()">刷新缓存</a-button>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('定时任务信息')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'sys:category:add'">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('分类字典')" v-has="'sys:category:export'">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" v-has="'sys:category:import'">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload' v-has="'sys:category:import'">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0" v-has="'sys:category:del'">
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('编码校验规则')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('多数据源管理')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('填值规则')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" >添加用户</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :before-upload='beforeUpload'>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>
|
||||
|
||||
@@ -17,11 +17,19 @@
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" :hasFeedback="true" >
|
||||
<a-input type="password" placeholder="请输入登录密码" v-decorator="[ 'password', validatorRules.password]" />
|
||||
<a-input :type="passwordType" placeholder="请输入登录密码" v-decorator="[ 'password', validatorRules.password]" >
|
||||
<a-icon title="显示密码" @click="passwordType='text'" slot="suffix" v-if="passwordType==='password'" type="eye" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||
<a-icon title="隐藏密码" @click="passwordType='password'" slot="suffix" v-else type="eye-invisible" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||
<!-- <a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>-->
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" :hasFeedback="true" >
|
||||
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
||||
<a-input :type="passwordType2" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]">
|
||||
<a-icon title="显示密码" @click="passwordType2='text'" slot="suffix" v-if="passwordType2==='password'" type="eye" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||
<a-icon title="隐藏密码" @click="passwordType2='password'" slot="suffix" v-else type="eye-invisible" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||
<!-- <a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>-->
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
|
||||
</a-form>
|
||||
@@ -36,6 +44,8 @@ export default {
|
||||
name: 'PasswordModal',
|
||||
data () {
|
||||
return {
|
||||
passwordType: 'password',
|
||||
passwordType2: 'password',
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
confirmDirty: false,
|
||||
|
||||
@@ -126,9 +126,9 @@
|
||||
</a-spin>
|
||||
|
||||
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
||||
<a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">
|
||||
<a-button style="margin-right: .8rem">取消</a-button>
|
||||
</a-popconfirm>
|
||||
<!-- <a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">-->
|
||||
<a-button style="margin-right: .8rem" @click="handleCancel">取消</a-button>
|
||||
<!-- </a-popconfirm>-->
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">提交</a-button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
树操作 <a-icon type="up" />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<a-popconfirm title="确定放弃编辑?" @confirm="close" okText="确定" cancelText="取消">
|
||||
<a-button style="margin-right: .8rem">取消</a-button>
|
||||
</a-popconfirm>
|
||||
<!-- <a-popconfirm title="确定放弃编辑?" @confirm="close" okText="确定" cancelText="取消">-->
|
||||
<a-button style="margin-right: .8rem" @click="close">取消</a-button>
|
||||
<!-- </a-popconfirm>-->
|
||||
<a-button @click="handleSubmit(false)" type="primary" :loading="loading" ghost style="margin-right: 0.8rem">仅保存</a-button>
|
||||
<a-button @click="handleSubmit(true)" type="primary" :loading="loading">保存并关闭</a-button>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
>
|
||||
<a-icon title="显示密码" @click="passwordType='text'" slot="suffix" v-if="passwordType==='password'" type="eye" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||
<a-icon title="隐藏密码" @click="passwordType='password'" slot="suffix" v-else type="eye-invisible" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||
<a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||
<!-- <a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>-->
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
Reference in New Issue
Block a user