소스 검색

客户管理修改

master
yangpeilai 2 달 전
부모
커밋
32cd753f63

+ 1
- 1
src/crud/components/Dialog.operation.vue 파일 보기

@@ -17,7 +17,7 @@
</div>
<!-- 此处的width决定了是否要换行 v-show="!item.form.hide"-->

{{ form[item.form.prop ? item.form.prop : item.prop] }}
<!-- {{ form[item.form.prop ? item.form.prop : item.prop] }}-->
<el-form-item style="position: relative" v-if="
!item.form.hideEdit && !item.form.hide && item.form.type != 'title'
" class="as-bold" :label="item.label" :prop="item.prop" :label-width="item.form.formLabelWidth ? item.form.formLabelWidth : formLabelWidth

+ 1
- 1
src/crud/components/Search.operation.vue 파일 보기

@@ -115,7 +115,7 @@
//指定上传的地址
type: Object,
default: () => ({
bucket: 'default-bucket',
bucket: '',
}),
},
uploadBtnName:{

+ 22
- 10
src/layout/components/RealNameAuthentication.vue 파일 보기

@@ -83,7 +83,7 @@
const ruleFormRef = ref()

const USER_ID_TYPE = computed(() => {
return $storeinitData.state.dictData['USER_ID_TYPE'] || []
return $storeinitData.state.dictData['ID_TYPE'] || []
})

const USER_GENDER = computed(() => {
@@ -109,18 +109,25 @@
// 识别身份证
function identifyingInformation() {
buttonLoading.value = true
console.log(form.value, 'form.valueform.value')
console.log(form.value.userImgFrontFileBase64, '-form.valueform.value')
if(form.value.userImgFrontFileBase64=== ''|| form.value.userImgFrontFileBase64=== null|| form.value.userImgFrontFileBase64=== undefined){
ElMessage.error('请上传身份证正面图片');
buttonLoading.value = false
return
}
const params = {
agencyId: 52010106004,
source: 1,
imageType: 1,
fileName: form.value.userImgFrontName,
imageBase64: form.value.userImgFrontFileBase64
// agencyId: 52010106004,
// source: 1,
// imageType: 1,
// fileName: form.value.userImgFrontName,
// imageBase64: form.value.userImgFrontFileBase64
type:1,
imagePath:form.value.imagePath
}
BaseService.postN('/userw/ocr/idcard', params).then((res: any) => {
BaseService.postN('/iaw/api/ocr/do', params).then((res: any) => {
if (res && res.statusCode === 0) {
const data = res.data
form.value.idType = data.idtype == '1' ? 'SFZ' : data.idtype // 暂时转换后期整体更改
form.value.idType = '101' // 暂时转换后期整体更改
form.value.idNum = data.idno
form.value.name = data.name
form.value.gender = data.gender == '男' ? 'MALE' : data.gender == '女' ? 'FEMALE' : 'UNKOWN' // 暂时转换后期整体更改
@@ -151,7 +158,7 @@
gender: form.value.gender,
authenticationOpenId: (props.staffOpenId ? props.staffOpenId : sessionStorage.getItem('openId')) ?? '' // 员工管理
}
BaseService.postN('/userw/portal/realnameauthentication', params).then((res: any) => {
BaseService.postN('/userw/account/realnameauthentication', params).then((res: any) => {
if (res && res.code === 0) {
isShow.value = false
if (!props.staffOpenId) {
@@ -190,6 +197,11 @@
}
// 上传成功
function onSuccess(response: any, uploadFile: any, item: any) {
if(response.code == 200){
ElMessage.success(response.msg)
form.value.imagePath=response.data.ossFilePath
}

// Base64
getBase64(uploadFile.raw).then((resBase64: any) => {
if (item.prop == 'userIdImgUrl') {

+ 22
- 7
src/views/system/connection/RealNameMobileEdit.vue 파일 보기

@@ -160,15 +160,23 @@
// 识别身份证
function identifyingInformation() {
buttonLoading.value = true
console.log(form.value, 'form.valueform.value')
// console.log("===>",form.value.userImgFrontFileBase64)
if(form.value.userImgFrontFileBase64=== ''|| form.value.userImgFrontFileBase64 === null|| form.value.userImgFrontFileBase64 === undefined){
buttonLoading.value = false
ElMessage.error('请上传身份证正面图片');
return
}
const params = {
agencyId: 52010106004,
source: 1,
imageType: 1,
fileName: form.value.userImgFrontName,
imageBase64: form.value.userImgFrontFileBase64
// agencyId: 52010106004,
// source: 1,
// imageType: 1,
// fileName: form.value.userImgFrontName,
// imageBase64: form.value.userImgFrontFileBase64
type:1,
imagePath:form.value.imagePath

}
BaseService.postN('/userw/ocr/idcard', params).then((res: any) => {
BaseService.postN('/iaw/api/ocr/do', params).then((res: any) => {
if (res && res.code === 0) {
const data = res.data
// form.value.idType = data.idtype == '1' ? 'SFZ' : data.idtype // 暂时转换后期整体更改
@@ -249,6 +257,12 @@
}
// 上传成功
function onSuccess1(response: any, uploadFile: any) {
// console.log("上传身份证1===>",response)
if(response.code == 200){
ElMessage.success(response.data.msg)
form.value.imagePath=response.data.ossFilePath
}

// Base64
getBase64(uploadFile.raw).then((resBase64: any) => {
form.value.userImgFrontFileBase64 = resBase64  //直接拿到base64信息 .split(',')[1]
@@ -260,6 +274,7 @@
}
// 上传成功
function onSuccess2(response: any, uploadFile: any) {
// console.log("上传身份证2===>",response)
form.value.sideUrl = import.meta.env.VITE_APP_UPLOAD_URL + response.data.ossFilePath
}

+ 10
- 9
src/views/system/connection/index.vue 파일 보기

@@ -8,9 +8,9 @@
placeholder="请输入用户名称" />
<el-input maxlength="60" v-trim clearable v-model="searchForm.account" style="width: 200px"
placeholder="请输入用户账号" />
<el-select clearable v-model="searchForm.userType" style="width: 200px" placeholder="请选择用户类型">
<el-option v-for="item in userTypeList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<!-- <el-select clearable v-model="searchForm.userType" style="width: 200px" placeholder="请选择用户类型">-->
<!-- <el-option v-for="item in userTypeList" :key="item.value" :label="item.label" :value="item.value" />-->
<!-- </el-select>-->
<el-input maxlength="60" v-trim clearable v-model="searchForm.mobile" style="width: 200px"
placeholder="请输入手机号" />
<el-input maxlength="60" v-trim clearable v-model="searchForm.idNum" style="width: 200px"
@@ -44,7 +44,7 @@
</template>
</crud-template>
<el-dialog title="分配角色" v-model="dialogAssignRoles">
<ModifyRole :ref="(el) => (modifyRoleRef = el)" @close-handle="cancel" @refresh-list="btnSearch()" />
<ModifyRole :ref="(el) => (dataForm1Ref = el)" @close-handle="cancel" @refresh-list="btnSearch()" />
</el-dialog>
<RealNameAuthentication @success="successfulCertification" v-model="AuthenticationVisible"
:staffOpenId="staffOpenId" />
@@ -72,10 +72,10 @@
//或取路由传入过来的对象数据
const route = useRoute()
const userTypeList = computed(() => {
return $storeinitData.state.dictData['USER_USER_TYPE'] || []
return $storeinitData.state.dictData['USER_TYPE'] || []
})
const idTypeList = computed(() => {
return $storeinitData.state.dictData['CERTIFICATE_TYPE'] || []
return $storeinitData.state.dictData['ID_TYPE'] || []
})
const genderList = computed(() => {
return $storeinitData.state.dictData['USER_GENDER'] || []
@@ -83,7 +83,7 @@
const crudRef = ref()
const itemStart = ref(true)
const typeOption = ref('')
const modifyRoleRef = ref()
const dataForm1Ref = ref()
const searchForm = ref({
account: '',
name: '',
@@ -270,7 +270,9 @@

// 编辑按钮
function handleEdit(row: any) {
const data: any = toRaw(row)
typeOption.value = 'edit'
crudRef.value.title = '编辑'
crudRef.value.form = row
crudRef.value.dialogFormVisible = true
}
@@ -328,9 +330,8 @@
dialogAssignRoles.value = true
crudRef.value.title = '分配角色'
typeOption.value = 'modifyRole'

nextTick(() => {
if (modifyRoleRef.value) modifyRoleRef.value.init(data)
if (dataForm1Ref.value) dataForm1Ref.value.init(data)
})
}
// 重置密码

+ 4
- 3
src/views/system/connection/modifyRole.vue 파일 보기

@@ -86,13 +86,13 @@
...row,
}
dataForm.value.roleIds = []
getSelectedList(row.id, '69af303ba2eb4608a099163f0d2a5dbd')
getSelectedList(row.id, '601052a249c04155831710b577cb796d')
// getSelectedList(row.id, '69af303ba2eb4608a099163f0d2a5dbd')
// getSelectedList(row.id, '601052a249c04155831710b577cb796d')
}
}
// 获取所有的小程序角色
function getAllRole() {
BaseService.postN('/userw/account/getminiprogramrole').then((res: any) => {
BaseService.postN('/userw/account/getminiprogramroleAll').then((res: any) => {
if (res && res.code === 0) {
let bizContent = res.data
let data = bizContent.roleList || []
@@ -114,6 +114,7 @@
BaseService.postN('/userw/account/getminiprogramrole', {
id: id,
loginSource1,
sourceType:loginSource1
}).then((res: any) => {
if (res && res.code === 0) {
let bizContent = res.data

+ 1
- 1
src/views/system/dictionaries/index.vue 파일 보기

@@ -209,7 +209,7 @@ function refreshLeft() {
function getSystemList() {
BaseService.postN('/userw/rbac/systemtypelist').then((res: any) => {
if (res && res.code === 0) {
let list = res.data || []
let list = res.data.systemTypeList || []
let dataList = [] as IObject[]
list.map((item) => {
dataList.push({

+ 1
- 1
src/views/system/menuManage/index.vue 파일 보기

@@ -682,7 +682,7 @@
function getSystemAllList() {
BaseService.postN('/userw/rbac/systemtypelist').then((res: any) => {
if (res && res.code === 0) {
let list = res.data || []
let list = res.data.systemTypeList || []
let dataList = [] as IObject[]
list.map((item) => {
dataList.push({

+ 8
- 7
src/views/system/roleManage/index.vue 파일 보기

@@ -448,7 +448,7 @@
if (typeOption.value === 'add' || typeOption.value === 'addChild') {
delete params.id

BaseService.postN('/userw/rbac/roleadd', {
BaseService.postN('/userw/rbac/roleAdd', {
...params,
}).then((res: any) => {
if (res && res.code === 0) {
@@ -557,7 +557,7 @@
type: 'error',
})
.then(() => {
BaseService.postN('/userw/rbac/roledelete', { id: row.id }).then((res: any) => {
BaseService.postN('/userw/rbac/roleDelete', { id: row.id }).then((res: any) => {
if (res && res.code === 0) {
getList()
ElMessage.success('删除成功')
@@ -673,14 +673,14 @@
// type 1是启用 2是禁用
let api = ''
if (type === 1) {
api = '/userw/rbac/roleenable'
api = '/userw/rbac/roleEnable'
} else if (type === 2) {
api = '/userw/rbac/roledisable'
api = '/userw/rbac/roleDisable'
}
BaseService.postN(api, { id: row.id }).then((res: any) => {
if (res && res.code === 0) {
getList()
ElMessage.success(res.data?.info)
ElMessage.success(res.message)
} else {
ElMessage.error(res.message)
}
@@ -694,8 +694,9 @@
BaseService.postN('/userw/rbac/systemTypeListByRbacSource', {
rbacSource: rbacSource ?? addForm.value.roleSource,
}).then((res: any) => {
console.log("--------->",res)
if (res && res.code === 0) {
let list = res.data || []
let list = res.data.list || []
let dataList = [] as IObject[]
list.map((item) => {
dataList.push({
@@ -713,7 +714,7 @@
function getSystemAllList() {
BaseService.postN('/userw/rbac/systemtypelist').then((res: any) => {
if (res && res.code === 0) {
let list = res.data || []
let list = res.data.systemTypeList || []
let dataList = [] as IObject[]
list.map((item) => {
dataList.push({

Loading…
취소
저장