pull/5/head
qsh 2 months ago
parent 1d1f1762f8
commit 9b7543f65f
  1. 5
      src/api/system/user/index.ts
  2. 12
      src/utils/constants.ts
  3. 2
      src/views/Basic/Dept/index.vue
  4. 2
      src/views/Basic/Menu/index.vue
  5. 33
      src/views/Basic/User/UserForm.vue
  6. 7
      src/views/Basic/WxRobot/Record.vue
  7. 81
      src/views/Basic/WxRobot/Setting.vue
  8. 62
      src/views/Basic/WxRobot/index.data.js
  9. 76
      src/views/Basic/WxRobot/index.vue
  10. 6
      src/views/Profile/Index.vue
  11. 16
      src/views/Profile/components/BasicInfo.vue

@ -93,3 +93,8 @@ export const getAllUserList = (): Promise<UserVO[]> => {
export const getAllUserListWithHire = (): Promise<UserVO[]> => {
return request.get({ url: '/admin-api/system/user/no/permission/list-all' })
}
// 获取钉钉id
export const getDDIdByPhone = (params) => {
return request.get({ url: '/admin-api/system/user/getDingTalkUserIdByMobile', params })
}

@ -74,13 +74,13 @@ export const SystemUserSocialTypeEnum = {
type: 20,
source: 'dingtalk',
img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png'
},
WECHAT_ENTERPRISE: {
title: '企业微信',
type: 30,
source: 'wechat_enterprise',
img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png'
}
// WECHAT_ENTERPRISE: {
// title: '企业微信',
// type: 30,
// source: 'wechat_enterprise',
// img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png'
// }
}
/**

@ -21,7 +21,7 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list" row-key="id" default-expand-all border>
<el-table-column prop="name" label="部门名称" />
<el-table-column prop="leader" label="负责人" width="120" />
<el-table-column prop="leaderUserName" label="负责人" width="120" />
<el-table-column prop="sort" label="排序" width="200" />
<el-table-column prop="status" label="状态" width="100">
<template #default="{ row }">

@ -84,7 +84,7 @@
<!-- 表单弹窗添加/修改 -->
<MenuForm ref="formRef" :appList="appList" @success="getList" />
</template>
<script lang="ts" name="SystemMenu" setup>
<script lang="ts" name="Menu" setup>
import { handleTree } from '@/utils/tree'
import * as MenuApi from '@/api/system/menu'
import MenuForm from './MenuForm.vue'

@ -5,7 +5,7 @@
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="80px"
label-width="100px"
>
<el-row :gutter="20">
<el-col :span="12">
@ -102,6 +102,23 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12" :offset="0">
<el-form-item label="钉钉手机号">
<el-input
v-model="formData.ddPhone"
placeholder="请输入钉钉手机号"
clearable
@blur="getDDId"
/>
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="钉钉Id" prop="dingUserId">
<el-input v-model="formData.dingUserId" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="备注">
@ -132,7 +149,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
const formData = ref<any>({
nickname: '',
deptId: '',
mobile: '',
@ -239,4 +256,16 @@ const resetForm = () => {
}
formRef.value?.resetFields()
}
async function getDDId() {
try {
if (!formData.value.ddPhone) {
formData.value.dingUserId = undefined
return
}
const data = await UserApi.getDDIdByPhone({ mobile: formData.value.ddPhone })
formData.value.dingUserId = data
} finally {
}
}
</script>

@ -0,0 +1,7 @@
<template>
<div> record </div>
</template>
<script setup name="WXRecord"></script>
<style lang="scss" scoped></style>

@ -0,0 +1,81 @@
<template>
<div>
<el-table v-loading="loading" :data="tableList" border stripe>
<el-table-column v-for="col in columns" :prop="col.prop" :key="col.prop" :label="col.label" />
<el-table-column label="发送方式" min-width="150">
<template #default="{ row }">
<el-checkbox-group v-model="row.sendType" size="small" @change="rowChange(row)">
<el-checkbox :label="1"> 微信 </el-checkbox>
<el-checkbox :label="2"> 微信群 </el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column label="微信群名称" min-width="150">
<template #default="{ row }">
<span v-if="!row.edit">{{ row.wxGroup }}</span>
<el-input v-else v-model="row.wxGroup" size="small" clearable @blur="rowChange(row)" />
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<template #default="{ row }">
<div>
<el-button type="primary" style="padding: 5px 0" text @click="row.edit = true">
修改群名称
</el-button>
</div>
<div>
<el-button type="primary" style="padding: 5px 0" text @click="row.edit = true">
修改发送时间
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script setup name="WXSetting">
const loading = ref(false)
const tableList = ref([
{
name: '分配通知',
sendType: []
},
{
name: '发货通知',
sendType: []
},
{
name: '月业绩排名',
sendType: []
}
])
const columns = [
{
label: '消息名称',
prop: 'name'
},
{
label: '解释说明',
prop: 'remark'
},
{
label: '发送频率',
prop: 'sendFrequency'
},
{
label: '发送时间',
prop: 'sendTime'
}
]
async function rowChange(row) {
try {
console.log(row)
} finally {
row.edit = false
}
}
</script>
<style lang="scss" scoped></style>

@ -1,62 +0,0 @@
// import { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const statusOptions = [
{ label: '发送成功', value: 1 },
{ label: '发送失败', value: 2 },
{ label: '排队中', value: 3 },
{ label: '微信端卡住', value: 4 }
]
// CrudSchema:https://doc.iocoder.cn/vue3/crud-schema/
const crudSchemas = reactive([
{
label: '发送对象',
field: 'sendUser',
isSearch: true,
isTable: true
},
{
label: '发送内容',
field: 'content',
isSearch: false,
isTable: true
},
{
label: '发送状态',
field: 'status',
isSearch: true,
isTable: true,
search: {
component: 'Select',
api: () => statusOptions,
componentProps: {
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
}
},
{
label: '发送时间',
field: 'createTime',
isSearch: true,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD'
},
search: {
component: 'DatePicker',
componentProps: {
type: 'daterange',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
startPlaceholder: '发送时间',
endPlaceholder: '发送时间'
}
}
}
])
export const { allSchemas } = useCrudSchemas(crudSchemas)

@ -1,77 +1,19 @@
<template>
<el-tabs v-model="tabIndex" type="border-card">
<el-tab-pane label="微信消息记录" :name="0">
<!-- 搜索工作栏 -->
<Search
:schema="allSchemas.searchSchema"
labelWidth="0"
@search="setSearchParams"
@reset="setSearchParams"
/>
<!-- 列表 -->
<SSTable
class="mt-20px"
v-model:tableObject="tableObject"
:tableColumns="allSchemas.tableColumns"
@get-list="getTableList"
>
<el-table-column
v-for="item in allSchemas.tableColumns"
:key="item.field"
:prop="item.field"
:label="item.label"
:fixed="item.fixed"
min-width="150px"
showOverflowTooltip
/>
<el-table-column label="操作" width="150px" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="sendMsg(row)">再次发送</el-button>
</template>
</el-table-column>
</SSTable>
<!-- <el-tab-pane label="微信消息记录" :name="0">
<Record />
</el-tab-pane> -->
<el-tab-pane label="消息配置" :name="1">
<Setting />
</el-tab-pane>
</el-tabs>
</template>
<script setup>
import { allSchemas } from './index.data.js'
const tabIndex = ref(0)
const tableObject = ref({
tableList: [],
loading: false,
total: 1,
pageSize: 20,
currentPage: 1
})
function setSearchParams() {
tableObject.value.tableList = [
{
sendUser: '测试',
content: '您今日有10条待跟进的线索',
status: '发送成功',
createTime: '2024-04-25 12:00:00'
}
]
}
function getTableList() {
tableObject.value.tableList = [
{
sendUser: '测试',
content: '您今日有10条待跟进的线索',
status: '发送成功',
createTime: '2024-04-25 12:00:00'
}
]
}
<script setup name="WXBoot">
// import Record from './Record.vue'
import Setting from './Setting.vue'
function sendMsg() {
console.log('测试')
}
const tabIndex = ref(1)
</script>
<style lang="scss" scoped></style>

@ -22,16 +22,16 @@
<el-tab-pane :label="t('profile.info.resetPwd')" name="resetPwd">
<ResetPwd />
</el-tab-pane>
<el-tab-pane :label="t('profile.info.userSocial')" name="userSocial">
<!-- <el-tab-pane :label="t('profile.info.userSocial')" name="userSocial">
<UserSocial />
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
</div>
</el-card>
</div>
</template>
<script setup lang="ts" name="Profile">
import { BasicInfo, ProfileUser, ResetPwd, UserSocial } from './components/'
import { BasicInfo, ProfileUser, ResetPwd } from './components/'
const { t } = useI18n()
const activeName = ref('basicInfo')

@ -26,14 +26,14 @@ const { t } = useI18n()
//
const rules = reactive<FormRules>({
nickname: [{ required: true, message: t('profile.rules.nickname'), trigger: 'blur' }],
email: [
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
{
type: 'email',
message: t('profile.rules.truemail'),
trigger: ['blur', 'change']
}
],
// email: [
// { required: true, message: t('profile.rules.mail'), trigger: 'blur' },
// {
// type: 'email',
// message: t('profile.rules.truemail'),
// trigger: ['blur', 'change']
// }
// ],
mobile: [
{ required: true, message: t('profile.rules.phone'), trigger: 'blur' },
{

Loading…
Cancel
Save