Merge branch 'dev' of http://192.168.0.75:3000/bonus/gz-att-web-new into dev
This commit is contained in:
commit
7ce0661136
|
|
@ -29,6 +29,24 @@ export const encryptCBC = function(word) {
|
|||
})
|
||||
return encrypted.toString()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 加密
|
||||
* @param word
|
||||
* @returns {string}
|
||||
*/
|
||||
export const encryptCBCToken = function(word) {
|
||||
const srcs = CryptoJS.enc.Utf8.parse(word)
|
||||
const encrypted = CryptoJS.AES.encrypt(srcs, cbc_key, {
|
||||
iv: cbc_iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
})
|
||||
return encrypted.toString()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解密
|
||||
* @param word
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<script>
|
||||
import { filePreview, lookFaceFile, lookFile, lookMioIoFile,downloadFile } from '@/utils/bns-kkFile-preview' // Assuming Base64 is saved as a separate module
|
||||
import useBase64 from '@/utils/base64Utils'
|
||||
import { encryptCBC } from '@/utils/aescbc'
|
||||
import { encryptCBC, encryptCBCToken } from '@/utils/aescbc'
|
||||
|
||||
export default {
|
||||
name: 'FileHandler',
|
||||
|
|
@ -78,7 +78,8 @@ export default {
|
|||
|
||||
let fileUploadPath = filePath
|
||||
let filePreviewPath
|
||||
let time = encryptCBC(Math.floor(Date.now()).toString())
|
||||
let time = encryptCBCToken(Math.floor(Date.now()).toString())
|
||||
console.log("time",time)
|
||||
if (suffix.toLowerCase() === 'pdf') {
|
||||
filePreviewPath = filePath.includes('http') ? filePath : `${this.lookFile}/${filePath}`
|
||||
this.showDownloadButton = false
|
||||
|
|
|
|||
|
|
@ -951,8 +951,8 @@ export default {
|
|||
return selectedUserNames.join(", ");
|
||||
},
|
||||
|
||||
getSelectedUserNameEvecTion() {
|
||||
const selectedUserIdsStr = this.form.hostUserId;
|
||||
getSelectedUserNameEvecTion(formData) {
|
||||
const selectedUserIdsStr = formData.hostUserId;
|
||||
// 将字符串分割成字符串数组,并将每个元素转换为整数
|
||||
const selectedUserIds = selectedUserIdsStr
|
||||
.split(",")
|
||||
|
|
@ -972,6 +972,7 @@ export default {
|
|||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
let formData = _.cloneDeep(this.form);
|
||||
var lists = this.form.orgHeadUserIdList.join(",");
|
||||
var idsArray = lists.split(",");
|
||||
console.log("idsArray", idsArray);
|
||||
|
|
@ -992,10 +993,10 @@ export default {
|
|||
// return ;
|
||||
// }
|
||||
console.log(filteredIds);
|
||||
this.form.travelers = filteredIds.join(",");
|
||||
console.log(this.form.travelers);
|
||||
formData.travelers = filteredIds.join(",");
|
||||
console.log(formData.travelers);
|
||||
var nameList = this.getSelectedUserNames(filteredIds);
|
||||
this.form.travelersName = nameList;
|
||||
formData.travelersName = nameList;
|
||||
|
||||
var list = this.form.hostUserId.join(",");
|
||||
// 将字符串分割成数组
|
||||
|
|
@ -1007,19 +1008,19 @@ export default {
|
|||
this.$modal.msgError("选择’/‘后不能在选择其他人员");
|
||||
return;
|
||||
}
|
||||
this.form.hostUserId = list;
|
||||
var hostNameList = this.getSelectedUserNameEvecTion();
|
||||
this.form.hostUserName = hostNameList;
|
||||
formData.hostUserId = list;
|
||||
var hostNameList = this.getSelectedUserNameEvecTion(formData);
|
||||
formData.hostUserName = hostNameList;
|
||||
|
||||
if (this.form.id != undefined) {
|
||||
this.form.examineStatus = 0;
|
||||
updateEvection(this.form).then((response) => {
|
||||
formData.examineStatus = 0;
|
||||
updateEvection(formData).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEvection(this.form).then((response) => {
|
||||
addEvection(formData).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
|
|
|||
|
|
@ -647,10 +647,10 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
console.log(this.form)
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.form)
|
||||
let formData = _.cloneDeep(this.form);
|
||||
var list = this.form.hostUserId.join(",");
|
||||
// 将字符串分割成数组
|
||||
const userIdArray = list.split(',');
|
||||
|
|
@ -662,19 +662,19 @@ export default {
|
|||
return ;
|
||||
}
|
||||
|
||||
this.form.hostUserId = list;
|
||||
var nameList = this.getSelectedUserNameLeave();
|
||||
this.form.hostUserName = nameList;
|
||||
formData.hostUserId = list;
|
||||
var nameList = this.getSelectedUserNameLeave(formData);
|
||||
formData.hostUserName = nameList;
|
||||
|
||||
if (this.form.id != undefined) {
|
||||
this.form.examineStatus = 0
|
||||
updateLeaveReporting(this.form).then(response => {
|
||||
formData.examineStatus = 0
|
||||
updateLeaveReporting(formData).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addLeaveReporting(this.form).then(response => {
|
||||
addLeaveReporting(formData).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
|
@ -684,8 +684,8 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
getSelectedUserNameLeave() {
|
||||
const selectedUserIdsStr = this.form.hostUserId;
|
||||
getSelectedUserNameLeave(formData) {
|
||||
const selectedUserIdsStr = formData.hostUserId;
|
||||
// 将字符串分割成字符串数组,并将每个元素转换为整数
|
||||
const selectedUserIds = selectedUserIdsStr.split(',').map(id => parseInt(id.trim(), 10));
|
||||
|
||||
|
|
|
|||
|
|
@ -607,6 +607,7 @@ export default {
|
|||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.form)
|
||||
let formData = _.cloneDeep(this.form);
|
||||
var list = this.form.hostUserId.join(",");
|
||||
|
||||
// 将字符串分割成数组
|
||||
|
|
@ -619,16 +620,16 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
this.form.hostUserId = list;
|
||||
formData.hostUserId = list;
|
||||
if (this.form.id != undefined) {
|
||||
this.form.examineStatus = 0
|
||||
updateHoliday(this.form).then(response => {
|
||||
formData.examineStatus = 0
|
||||
updateHoliday(formData).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addHoliday(this.form).then(response => {
|
||||
addHoliday(formData).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
|
|
|||
|
|
@ -573,6 +573,7 @@ export default {
|
|||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.form)
|
||||
let formData = _.cloneDeep(this.form);
|
||||
var list = this.form.hostUserId.join(',')
|
||||
|
||||
// 将字符串分割成数组
|
||||
|
|
@ -585,16 +586,16 @@ export default {
|
|||
return
|
||||
}
|
||||
|
||||
this.form.hostUserId = list
|
||||
formData.hostUserId = list
|
||||
if (this.form.id != undefined) {
|
||||
this.form.examineStatus = 0
|
||||
updateHoliday(this.form).then(response => {
|
||||
formData.examineStatus = 0
|
||||
updateHoliday(formData).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addHoliday(this.form).then(response => {
|
||||
addHoliday(formData).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
|
|
|
|||
Loading…
Reference in New Issue