新增了剩余线索数量和计费开关

master
doublekou 12 months ago
parent 1a50b24d69
commit b09112f769

@ -140,7 +140,7 @@ export type SysUserDTOTag = {
} }
export type SysUserDTO = { export type SysUserDTO = {
//标签组名 //标签组名
name: string | undefined name?: string | undefined
// 主键id // 主键id
// userId?: number // userId?: number
// // 前端传入密码 // // 前端传入密码
@ -164,8 +164,13 @@ export type SysUserDTO = {
// organizationId?: number // organizationId?: number
// // 角色标识列表 // // 角色标识列表
// roleCodes: string[] // roleCodes: string[]
desc: objectState desc?: objectState
// stage?: objectState // stage?: objectState
//计费开关
chargingStatus?: number
nickname?: string | undefined
//剩余线索数量
residueClueNum?: number | undefined
} }
//编辑线索阶段表单 //编辑线索阶段表单

@ -147,6 +147,12 @@ const columns: ProColumns[] = [
return h(DictBadge, { dictCode: 'user_status', value: value }) return h(DictBadge, { dictCode: 'user_status', value: value })
} }
}, },
{
key: 'residueClueNum',
title: '剩余线索数量',
dataIndex: 'residueClueNum',
width: '100px'
},
{ {
title: '创建日期', title: '创建日期',
dataIndex: 'createTime', dataIndex: 'createTime',

@ -34,9 +34,8 @@
placeholder="请选择" placeholder="请选择"
/> />
</a-form-item> </a-form-item>
<a-form-item label="线索数量">
<a-form-item label="状态"> <a-input v-model:value="formModel.residueClueNum" placeholder="请输入" />
<dict-radio-group v-model:value="formModel.status" dict-code="user_status" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -62,6 +61,9 @@
@changes="updateRole" @changes="updateRole"
/> />
</a-form-item> </a-form-item>
<a-form-item label="状态">
<dict-radio-group v-model:value="formModel.status" dict-code="user_status" />
</a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
@ -98,7 +100,8 @@ const formModel = reactive<SysUserDTO>({
gender: 1, gender: 1,
phoneNumber: '', phoneNumber: '',
email: '', email: '',
roleCodes: [] roleCodes: [],
residueClueNum: undefined
}) })
// //

@ -58,6 +58,19 @@
<template #icon><UserOutlined /></template> <template #icon><UserOutlined /></template>
</a-avatar> </a-avatar>
</template> </template>
<template v-else-if="column.key === 'chargingStatus'">
<a-switch
v-if="record.whichUserId === 1"
:checked="record.chargingStatus === 1 ? true : false"
@change="switchChange(record)"
/>
<span v-else></span>
</template>
<template v-else-if="column.key === 'residueClueNum'">
<span v-if="record.whichUserId !== 1">{{ record.residueClueNum }}</span>
<span v-else></span>
</template>
<template v-else-if="column.key === 'operate'"> <template v-else-if="column.key === 'operate'">
<a-dropdown :trigger="['click']"> <a-dropdown :trigger="['click']">
<a class="ant-dropdown-link" @click.prevent> 操作 </a> <a class="ant-dropdown-link" @click.prevent> 操作 </a>
@ -127,6 +140,9 @@ import { doRequest } from '@/utils/axios/request'
import type { MenuInfo } from 'ant-design-vue/es/menu/src/interface' import type { MenuInfo } from 'ant-design-vue/es/menu/src/interface'
import { DictBadge, DictText } from '@/components/Dict' import { DictBadge, DictText } from '@/components/Dict'
import { NewButton, DeleteTextButton } from '@/components/Button' import { NewButton, DeleteTextButton } from '@/components/Button'
//
import { updateUser } from '@/api/system/user'
import { message } from 'ant-design-vue'
defineOptions({ name: 'SysUserPage' }) defineOptions({ name: 'SysUserPage' })
@ -243,6 +259,33 @@ const uploadAvatarProcessor = (fileObj: FileObject, record: SysUserPageVO) => {
return res return res
}) })
} }
// const chargingStatus = ref()
const switchChange = (record: any) => {
console.log(record, 'record')
if (record.chargingStatus === 1) {
record.chargingStatus = 0
} else {
record.chargingStatus = 1
}
doRequest(
updateUser(
toRaw({
chargingStatus: record.chargingStatus,
username: record.username,
userId: record.userId,
nickname: record.nickname
})
),
{
onSuccess: (res: any) => {
if (res.code === 200) {
// message.success('')
// reloadTable()
}
}
}
)
}
// //
const columns: ProColumns[] = [ const columns: ProColumns[] = [
@ -281,6 +324,19 @@ const columns: ProColumns[] = [
return h(DictBadge, { dictCode: 'user_status', value: value }) return h(DictBadge, { dictCode: 'user_status', value: value })
} }
}, },
{
key: 'chargingStatus',
title: '计费开关',
dataIndex: 'chargingStatus',
width: '80px'
},
{
key: 'residueClueNum',
title: '剩余线索数量',
dataIndex: 'residueClueNum',
width: '100px',
align: 'center'
},
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTime', dataIndex: 'createTime',

@ -22,13 +22,13 @@ import { antdvStyleDeps } from './src/utils/resolvers'
//项目 //项目
// export const serverAddress = 'http://admin.ballcat.cn' // export const serverAddress = 'http://admin.ballcat.cn'
//xy //xy
// export const serverAddress = 'http://172.18.0.225:8000' export const serverAddress = 'http://172.18.0.225:8000'
//jt //jt
// export const serverAddress = 'http://172.18.1.8:8000' // export const serverAddress = 'http://172.18.1.8:8000'
//ts //ts
// export const serverAddress = 'http://172.18.0.228:8000' // export const serverAddress = 'http://172.18.0.228:8000'
//测试 //测试
export const serverAddress = 'http://39.100.77.21:8000' // export const serverAddress = 'http://39.100.77.21:8000'
//线上ip //线上ip
// export const serverAddress = 'http://175.27.212.74:80' // export const serverAddress = 'http://175.27.212.74:80'

Loading…
Cancel
Save