代码提交
This commit is contained in:
parent
652eaa7200
commit
9c94734322
|
|
@ -64,13 +64,13 @@ service.interceptors.request.use(
|
|||
repeatSubmit = false,
|
||||
skipReplayProtection = false
|
||||
} = headers
|
||||
|
||||
|
||||
// 读取全局安全开关(动态)并与请求头开关进行“与”组合
|
||||
const flags = getSecurityFlags()
|
||||
const useEncryptRequest = flags.encryptRequest && encryptRequest
|
||||
const useCheckIntegrity = flags.checkIntegrity && checkIntegrity
|
||||
const useEncryptResponse = flags.encryptResponse && encryptResponse
|
||||
|
||||
|
||||
// 设置请求头
|
||||
config.headers['encryptRequest'] = useEncryptRequest ? 'true' : 'false'
|
||||
config.headers['checkIntegrity'] = useCheckIntegrity ? 'true' : 'false'
|
||||
|
|
@ -119,7 +119,7 @@ service.interceptors.request.use(
|
|||
requestUrl += '?' + paramsString
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const signature = generateRequestSignature(userId, timestamp, method, requestUrl, userSecret)
|
||||
console.log(signature);
|
||||
console.log(requestUrl);
|
||||
|
|
@ -269,7 +269,7 @@ service.interceptors.response.use(
|
|||
) {
|
||||
return res.data
|
||||
}
|
||||
|
||||
|
||||
// 账号在其他设备登录的安全提示(基于后端返回信息关键词识别)
|
||||
const otherDeviceLogin = /multipleDeviceLogin/.test(String(msg || ''))
|
||||
if (otherDeviceLogin) {
|
||||
|
|
@ -329,11 +329,10 @@ service.interceptors.response.use(
|
|||
} else if (code === 500) {
|
||||
Message({ message: msg, type: 'error' })
|
||||
if(res.data.data){
|
||||
return Promise.reject(new Error(`${msg}:${JSON.stringify(res.data.data)}`));
|
||||
return Promise.reject(`${msg}:${JSON.stringify(res.data.data)}`);
|
||||
}else{
|
||||
return Promise.reject(new Error(msg));
|
||||
return Promise.reject(msg);
|
||||
}
|
||||
|
||||
} else if (code === 601) {
|
||||
Message({ message: msg, type: 'warning' })
|
||||
return Promise.reject('error')
|
||||
|
|
@ -358,7 +357,7 @@ service.interceptors.response.use(
|
|||
}else{
|
||||
message = '系统接口' + message.substr(message.length - 3) + '异常'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Message({ message: message, type: 'error', duration: 5 * 1000 })
|
||||
return Promise.reject(error)
|
||||
|
|
@ -407,4 +406,4 @@ export function download(url, params, filename, config) {
|
|||
})
|
||||
}
|
||||
|
||||
export default service
|
||||
export default service
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ export default {
|
|||
{ required: true, message: '档案名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
fileList: [
|
||||
{ validator: (rule, value, callback) => {
|
||||
{required: true, validator: (rule, value, callback) => {
|
||||
if (!Array.isArray(this.fileList) || this.fileList.length === 0) {
|
||||
callback(new Error('请上传附件文件'))
|
||||
} else {
|
||||
|
|
@ -184,10 +184,10 @@ export default {
|
|||
this.belongName = this.rowData.belongName;
|
||||
this.detailStatus = this.rowData.detailStatus;
|
||||
if ((this.isAdd === 'edit' || this.isAdd === 'detail') && this.rowData) {
|
||||
|
||||
|
||||
const res2 = await getFileManageByIdApi({id:this.rowData.id,proId:this.projectId});
|
||||
const obj =res2.data;
|
||||
|
||||
|
||||
// 编辑模式:填充表单数据
|
||||
this.form = {
|
||||
id: obj.id,
|
||||
|
|
@ -269,7 +269,7 @@ export default {
|
|||
}
|
||||
const isValidType = this.checkFileType(file)
|
||||
const isValidSize = this.checkFileSize(file)
|
||||
|
||||
|
||||
if (!isValidType) {
|
||||
this.$message.error('只能上传PDF和图片文件!')
|
||||
return false
|
||||
|
|
@ -278,13 +278,13 @@ export default {
|
|||
this.$message.error('文件大小不能超过`${this.maxFileTips}`!')
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
// 检查是否已有文件
|
||||
if (this.fileList.length >= 1) {
|
||||
this.$message.warning('只能上传一个文件,请先删除现有文件!')
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
return true
|
||||
},
|
||||
// 检查文件类型
|
||||
|
|
@ -292,7 +292,7 @@ export default {
|
|||
const allowedTypes = [
|
||||
'application/pdf',
|
||||
'image/jpeg',
|
||||
'image/jpg',
|
||||
'image/jpg',
|
||||
'image/png',
|
||||
]
|
||||
return allowedTypes.includes(file.type)
|
||||
|
|
@ -331,7 +331,7 @@ export default {
|
|||
}
|
||||
// console.log('文件列表更新:', fileList.length, '个文件')
|
||||
},
|
||||
|
||||
|
||||
/**验证 */
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate(valid => {
|
||||
|
|
@ -360,7 +360,7 @@ export default {
|
|||
this.fileList.map(file => {
|
||||
if(file.raw instanceof File){
|
||||
formData.append('file', file.raw);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.isAdd === 'add') {
|
||||
|
|
@ -402,7 +402,7 @@ export default {
|
|||
}else{
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -441,4 +441,4 @@ export default {
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ export const formLabel = [
|
|||
isShow: false, // 是否展示label
|
||||
f_type: 'ipt',
|
||||
f_label: '单项工程名称',
|
||||
f_model: 'proName',
|
||||
f_model: 'singleProName',
|
||||
f_max: 32,
|
||||
},
|
||||
{
|
||||
|
|
@ -30,4 +30,4 @@ export const columnsList = [
|
|||
{ t_props: 'createUserName', t_label: '申请人' },
|
||||
{ t_props: 'createTime', t_label: '申请时间' },
|
||||
{ t_slot: 'auditStatus', t_label: '审批状态' },
|
||||
]
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ export const formLabel = [
|
|||
isShow: false, // 是否展示label
|
||||
f_type: 'ipt',
|
||||
f_label: '单项工程名称',
|
||||
f_model: 'proName',
|
||||
f_model: 'singleProName',
|
||||
f_max: 32,
|
||||
},
|
||||
{
|
||||
|
|
@ -30,4 +30,4 @@ export const columnsList = [
|
|||
{ t_props: 'createUserName', t_label: '申请人' },
|
||||
{ t_props: 'createTime', t_label: '申请时间' },
|
||||
{ t_slot: 'auditStatus', t_label: '审批状态' },
|
||||
]
|
||||
]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<el-button type="primary" class="search-btn" :disabled="disabled"
|
||||
@click="submitForm('ruleForm')" v-if="!isRead">确认</el-button>
|
||||
</span>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -83,7 +83,7 @@ export default {
|
|||
errorObj: {
|
||||
transferIssue: '移交问题',
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -254,7 +254,7 @@ export default {
|
|||
}else{
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -293,4 +293,4 @@ export default {
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -38,12 +38,11 @@
|
|||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -85,7 +84,7 @@
|
|||
v-hasPermi="['monitor:logininfor:unlock']"
|
||||
>解锁</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
|
|
@ -94,7 +93,7 @@
|
|||
@click="handleExport"
|
||||
v-hasPermi="['monitor:logininfor:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -174,12 +173,23 @@ export default {
|
|||
/** 查询登录日志列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.list = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
)
|
||||
|
||||
// 构建查询参数
|
||||
const params = {
|
||||
...this.queryParams
|
||||
}
|
||||
|
||||
// 添加时间范围参数(直接使用 beginTime 和 endTime)
|
||||
if (this.dateRange && this.dateRange.length === 2) {
|
||||
params.beginTime = this.dateRange[0]
|
||||
params.endTime = this.dateRange[1]
|
||||
}
|
||||
|
||||
list(params).then(response => {
|
||||
this.list = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
|
|
|
|||
|
|
@ -62,12 +62,11 @@
|
|||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -98,7 +97,7 @@
|
|||
v-hasPermi="['monitor:operlog:remove']"
|
||||
>清空</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
|
|
@ -107,7 +106,7 @@
|
|||
@click="handleExport"
|
||||
v-hasPermi="['monitor:operlog:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -253,12 +252,23 @@ export default {
|
|||
/** 查询登录日志 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
this.list = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
)
|
||||
|
||||
// 构建查询参数
|
||||
const params = {
|
||||
...this.queryParams
|
||||
}
|
||||
|
||||
// 添加时间范围参数(直接使用 beginTime 和 endTime)
|
||||
if (this.dateRange && this.dateRange.length === 2) {
|
||||
params.beginTime = this.dateRange[0]
|
||||
params.endTime = this.dateRange[1]
|
||||
}
|
||||
|
||||
list(params).then(response => {
|
||||
this.list = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 操作日志类型字典翻译
|
||||
typeFormat(row, column) {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
@click="handleBackups"
|
||||
class="filter-item"
|
||||
style="margin-left: 20px"
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
v-hasPermi="['error:log:download']"
|
||||
>
|
||||
备份
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
@click="handleBackups"
|
||||
class="filter-item"
|
||||
style="margin-left: 20px"
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
v-hasPermi="['business:log:download']"
|
||||
>
|
||||
备份
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
|
|
|
|||
|
|
@ -115,9 +115,11 @@
|
|||
//重置
|
||||
resetFilter() {
|
||||
this.listQuery={
|
||||
rangeDate:[],
|
||||
startTime:'',
|
||||
endTime:'',
|
||||
type:'1',
|
||||
},
|
||||
};
|
||||
this.rangeDate = [];
|
||||
this.handleFilter()
|
||||
},
|
||||
getInitData() {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
@click="handleBackups"
|
||||
class="filter-item"
|
||||
style="margin-left: 20px"
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
v-hasPermi="['system:log:download']"
|
||||
>
|
||||
备份
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
v-hasPermi="['system:role:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:role:remove']">删除</el-button>
|
||||
|
||||
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"
|
||||
v-hasPermi="['system:role:edit']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
|
|
@ -248,7 +248,7 @@ export default {
|
|||
getList() {
|
||||
this.loading = true
|
||||
console.log(this.queryParams);
|
||||
|
||||
|
||||
listRole(this.queryParams).then(response => {
|
||||
this.roleList = response.rows
|
||||
this.total = response.total
|
||||
|
|
@ -488,7 +488,8 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const roleIds = row.roleId || this.ids
|
||||
this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function () {
|
||||
const roleName = row.roleName
|
||||
this.$modal.confirm('是否确认删除角色"' + roleName + '"的数据项?').then(function () {
|
||||
return delRole(roleIds)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
|
|
@ -503,4 +504,4 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue