修改bug

This commit is contained in:
zhoulingpo
2023-07-31 15:54:34 +08:00
parent a4ba49dc1b
commit a782cc6c0f
22 changed files with 127 additions and 89 deletions
@@ -205,7 +205,9 @@ export default {
}
}
}
.ant-modal-body{
height:500px !important;
}
.j-modal-title-row {
.left {
width: calc(100% - 56px - 56px);
+77 -58
View File
@@ -15,6 +15,7 @@ let importModalLoading
export const JeroListMixin = {
data () {
return {
uploading: false,
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
queryParam: {},
/* 数据源 */
@@ -73,6 +74,7 @@ export const JeroListMixin = {
}
},
methods: {
loadData (arg) {
if (!this.url.list) {
this.$message.error('请设置url.list属性!')
@@ -314,73 +316,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) {
+1 -1
View File
@@ -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>
<!-- 高级查询区域 -->
@@ -42,7 +42,7 @@
<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"
@change="handleImportExcel">
@change="handleImportExcel" :before-upload='beforeUpload'>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
@@ -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'>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
+2 -2
View File
@@ -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>
@@ -111,7 +111,7 @@
</template>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
<a-input-number v-model="model.departOrder" />
<a-input-number :max="1000000" :min="1" v-model="model.departOrder" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="手机号">
<a-input placeholder="请输入手机号" v-model="model.mobile" />
+2 -2
View File
@@ -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"/>
@@ -105,7 +105,7 @@
</template>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序" prop="departOrder">
<a-input-number v-model="model.departOrder"/>
<a-input-number :max="1000000" :min="1" v-model="model.departOrder"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="手机号" prop="mobile">
<a-input placeholder="请输入手机号" v-model="model.mobile"/>
+1 -1
View File
@@ -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" :action="importExcelUrl" :before-upload='beforeUpload' @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>
+1 -1
View File
@@ -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" :before-upload='beforeUpload' :action="importExcelUrl" @change="handleImportExcel">
<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" :before-upload='beforeUpload' @change="handleImportExcel" 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">
+1 -1
View File
@@ -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>
@@ -137,6 +137,12 @@ export default {
dataIndex: 'createTime',
align: 'center',
sorter: true
},
{
title: '操作类型',
dataIndex: 'operateType_dictText',
align: 'center'
}
],
operateColumn:
@@ -19,7 +19,7 @@
prop="departName"
:hidden="false"
:hasFeedback="true" >
<a-input id="departName" placeholder="请输入机构/部门名称" v-model="model.departName"/>
<a-input id="departName" :maxLength='100' placeholder="请输入机构/部门名称" v-model="model.departName"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :hidden="seen" label="上级部门" :hasFeedback="true">
<a-tree-select
@@ -64,25 +64,25 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="传真">
<a-input placeholder="请输入传真" v-model="model.fax"/>
<a-input :maxLength='32' placeholder="请输入传真" v-model="model.fax"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="地址">
<a-input placeholder="请输入地址" v-model="model.address"/>
<a-input :maxLength='100' placeholder="请输入地址" v-model="model.address"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序">
<a-input-number v-model="model.departOrder"/>
<a-input-number :max="1000000" :min="1" v-model="model.departOrder"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="备注">
<a-textarea placeholder="请输入备注" v-model="model.memo"/>
<a-textarea :maxLength='200' placeholder="请输入备注" v-model="model.memo"/>
</a-form-model-item>
</a-form-model>
@@ -43,7 +43,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序">
<a-input-number style="border:0;" v-model="model.departOrder"/>
<a-input-number :max="1000000" :min="1" style="border:0;" v-model="model.departOrder"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
@@ -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 {
passwordType2: 'password',
passwordType: 'password',
visible: false,
confirmLoading: false,
confirmDirty: false,
@@ -114,7 +114,7 @@
:wrapperCol="wrapperCol"
prop="sortNo"
label="排序">
<a-input-number placeholder="请输入菜单排序" v-model="model.sortNo" style="width: 200px" :readOnly="disableSubmit"/>
<a-input-number :max="1000000" :min="1" placeholder="请输入菜单排序" v-model="model.sortNo" style="width: 200px" :readOnly="disableSubmit"/>
</a-form-model-item>
<a-form-model-item
@@ -19,7 +19,7 @@
:wrapperCol="wrapperCol"
prop="titile"
label="标题">
<a-input placeholder="请输入标题" v-model="model.titile" :readOnly="disableSubmit"/>
<a-input :maxLength='100' placeholder="请输入标题" v-model="model.titile" :readOnly="disableSubmit"/>
</a-form-model-item>
</a-col>
<a-col :span="24/2">
@@ -126,9 +126,10 @@
</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>
<div class="drawer-bootom-button" v-show="!disableSubmit">
<!-- <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>