冲突合并
This commit is contained in:
commit
b674045ca3
|
|
@ -12,7 +12,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { filePreview, lookFaceFile, lookFile, lookMioIoFile } from '@/utils/bonus' // Assuming Base64 is saved as a separate module
|
import { filePreview, lookFaceFile, lookFile, lookMioIoFile } from '@/utils/bonus' // Assuming Base64 is saved as a separate module
|
||||||
import useBase64 from '@/api/base64Utils'
|
import useBase64 from '@/api/base64Utils'
|
||||||
import { encryptCBC } from '@/utils/aescbc'
|
import { encryptCBC, encryptCBCTime } from '@/utils/aescbc'
|
||||||
import { downloadFile } from '@/api/tool/select'
|
import { downloadFile } from '@/api/tool/select'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -78,7 +78,7 @@ export default {
|
||||||
|
|
||||||
let fileUploadPath = filePath
|
let fileUploadPath = filePath
|
||||||
let filePreviewPath
|
let filePreviewPath
|
||||||
let time = encryptCBC(Math.floor(Date.now()).toString())
|
let time = encryptCBCTime(Math.floor(Date.now()).toString())
|
||||||
if (suffix.toLowerCase() === 'pdf') {
|
if (suffix.toLowerCase() === 'pdf') {
|
||||||
filePreviewPath = filePath.includes('http') ? filePath : `${this.lookFile}/${filePath}`
|
filePreviewPath = filePath.includes('http') ? filePath : `${this.lookFile}/${filePath}`
|
||||||
this.showDownloadButton = false
|
this.showDownloadButton = false
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { login, logout, getInfo, refreshToken } from '@/api/login'
|
import { login, logout, getInfo, refreshToken } from '@/api/login'
|
||||||
import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth'
|
import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth'
|
||||||
|
import { Notification, MessageBox, Message, Loading } from 'element-ui'
|
||||||
import router, { resetRouter } from '@/router'
|
import router, { resetRouter } from '@/router'
|
||||||
import Router from '@/router'
|
import Router from '@/router'
|
||||||
|
|
||||||
|
|
@ -80,6 +81,7 @@ const user = {
|
||||||
login(username, password, code, uuid).then(res => {
|
login(username, password, code, uuid).then(res => {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
if(data.code && data.code===500){
|
if(data.code && data.code===500){
|
||||||
|
Message.error(data.msg)
|
||||||
reject(data);
|
reject(data);
|
||||||
}else {
|
}else {
|
||||||
setToken(data.access_token)
|
setToken(data.access_token)
|
||||||
|
|
|
||||||
|
|
@ -6,42 +6,58 @@ const cbc_iv = CryptoJS.enc.Utf8.parse('1234567812345678')
|
||||||
* 默认参数需要加密
|
* 默认参数需要加密
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
const jia_mi = false
|
const jia_mi=false;
|
||||||
/**
|
/**
|
||||||
* 默认后台会自动加密
|
* 默认后台会自动加密
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
const jie_mi = false
|
const jie_mi=false;
|
||||||
/**
|
/**
|
||||||
* 加密
|
* 加密
|
||||||
* @param word
|
* @param word
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export const encryptCBC = function (word) {
|
export const encryptCBC = function(word) {
|
||||||
if (!jia_mi) {
|
if(!jia_mi){
|
||||||
return word
|
return word;
|
||||||
}
|
}
|
||||||
const srcs = CryptoJS.enc.Utf8.parse(word)
|
const srcs = CryptoJS.enc.Utf8.parse(word)
|
||||||
const encrypted = CryptoJS.AES.encrypt(srcs, cbc_key, {
|
const encrypted = CryptoJS.AES.encrypt(srcs, cbc_key, {
|
||||||
iv: cbc_iv,
|
iv: cbc_iv,
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
padding: CryptoJS.pad.Pkcs7,
|
padding: CryptoJS.pad.Pkcs7
|
||||||
})
|
})
|
||||||
return encrypted.toString()
|
return encrypted.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解密
|
* 解密
|
||||||
* @param word
|
* @param word
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const decryptCBC = function (word) {
|
export const decryptCBC = function(word) {
|
||||||
if (!jie_mi) {
|
if(!jie_mi){
|
||||||
return word
|
return word;
|
||||||
}
|
}
|
||||||
const encrypted = CryptoJS.AES.decrypt(word, cbc_key, {
|
const encrypted = CryptoJS.AES.decrypt(word, cbc_key, {
|
||||||
iv: cbc_iv,
|
iv: cbc_iv,
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
padding: CryptoJS.pad.Pkcs7,
|
padding: CryptoJS.pad.Pkcs7
|
||||||
})
|
})
|
||||||
return encrypted.toString(CryptoJS.enc.Utf8)
|
return encrypted.toString(CryptoJS.enc.Utf8)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件预览专用
|
||||||
|
* @param word
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
export const encryptCBCTime= 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()
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,20 +66,15 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="社会统一征信代码" show-overflow-tooltip align="center" prop="socialUnifiedCreditCode" />
|
<el-table-column label="社会统一征信代码" show-overflow-tooltip align="center" prop="socialUnifiedCreditCode" />
|
||||||
<el-table-column label="总监" align="center" prop="directorsName">
|
<el-table-column label="总监" show-overflow-tooltip align="center" prop="userNum" />
|
||||||
<template slot-scope="{ row }">
|
<!-- <el-table-column label="总监" align="center" prop="directorsName"/>-->
|
||||||
<span @click="onHandleDirector(row)" style="color: #409eff; cursor: pointer">
|
<!-- <el-table-column label="总监联系方式" width="120" align="center">-->
|
||||||
{{ row.directorsName }}
|
<!-- <template slot-scope="scope">-->
|
||||||
</span>
|
<!-- <!– 检查是否存在身份证号 –>-->
|
||||||
</template>
|
<!-- <span v-if="scope.row.directorsPhone">{{ hideSensitiveInfo(scope.row.directorsPhone) }}</span>-->
|
||||||
</el-table-column>
|
<!-- <span v-else>-</span>-->
|
||||||
<el-table-column label="总监联系方式" width="120" align="center">
|
<!-- </template>-->
|
||||||
<template slot-scope="scope">
|
<!-- </el-table-column>-->
|
||||||
<!-- 检查是否存在身份证号 -->
|
|
||||||
<span v-if="scope.row.directorsPhone">{{ hideSensitiveInfo(scope.row.directorsPhone) }}</span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -186,41 +181,24 @@
|
||||||
:disabled="view"
|
:disabled="view"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总监" prop="directorsName" label-width="140px">
|
<!-- <el-form-item label="总监" prop="directorsName" label-width="140px">-->
|
||||||
<el-input
|
<!-- <el-input v-model="unitForm.directorsName" placeholder="请输入总监姓名" show-word-limit :maxlength="20"-->
|
||||||
v-model="unitForm.directorsName"
|
<!-- clearable v-no-whitespace-->
|
||||||
placeholder="请输入总监姓名"
|
<!-- :style="{width: '100%'}"-->
|
||||||
show-word-limit
|
<!-- :disabled="edit"></el-input>-->
|
||||||
:maxlength="20"
|
<!-- </el-form-item>-->
|
||||||
clearable
|
<!-- <el-form-item label="总监联系方式" prop="directorsPhone" label-width="140px">-->
|
||||||
v-no-whitespace
|
<!-- <el-input v-model="unitForm.directorsPhone" placeholder="请输入总监联系方式" show-word-limit :maxlength="11"-->
|
||||||
:style="{ width: '100%' }"
|
<!-- clearable v-no-whitespace-->
|
||||||
:disabled="edit"
|
<!-- :style="{width: '100%'}"-->
|
||||||
></el-input>
|
<!-- :disabled="edit"></el-input>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="总监联系方式" prop="directorsPhone" label-width="140px">
|
<!-- <el-form-item v-if="unitForm.supId == undefined" label="总监身份证" prop="directorsIdCard" label-width="140px">-->
|
||||||
<el-input
|
<!-- <el-input v-model="unitForm.directorsIdCard" placeholder="请输入总监总监身份证" show-word-limit :maxlength="18"-->
|
||||||
v-model="unitForm.directorsPhone"
|
<!-- clearable v-no-whitespace-->
|
||||||
placeholder="请输入总监联系方式"
|
<!-- :style="{width: '100%'}"-->
|
||||||
show-word-limit
|
<!-- ></el-input>-->
|
||||||
:maxlength="11"
|
<!-- </el-form-item>-->
|
||||||
clearable
|
|
||||||
v-no-whitespace
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:disabled="edit"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="unitForm.supId == undefined" label="总监身份证" prop="directorsIdCard" label-width="140px">
|
|
||||||
<el-input
|
|
||||||
v-model="unitForm.directorsIdCard"
|
|
||||||
placeholder="请输入总监总监身份证"
|
|
||||||
show-word-limit
|
|
||||||
:maxlength="18"
|
|
||||||
clearable
|
|
||||||
v-no-whitespace
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer" v-if="showOrNot">
|
<div slot="footer" class="dialog-footer" v-if="showOrNot">
|
||||||
<el-button type="primary" @click="submitForm" v-preventReClick="5000">提 交</el-button>
|
<el-button type="primary" @click="submitForm" v-preventReClick="5000">提 交</el-button>
|
||||||
|
|
@ -307,7 +285,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addSupervisoryUnit, checkIsExistUnitName } from '@/api/pro/proList'
|
import { addSupervisoryUnit, addSupervisoryUnitUser, checkIsExistUnitName } from '@/api/pro/proList'
|
||||||
import {
|
import {
|
||||||
delSupervisionUnit,
|
delSupervisionUnit,
|
||||||
listSupervisionUnit,
|
listSupervisionUnit,
|
||||||
|
|
@ -594,7 +572,7 @@ export default {
|
||||||
// 如果单位名称已存在,可以做出相应的提示或处理
|
// 如果单位名称已存在,可以做出相应的提示或处理
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
addSupervisoryUnit(this.unitForm).then(response => {
|
addSupervisoryUnitUser(this.unitForm).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '新建成功',
|
message: '新建成功',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue