Commit 76a807e5 authored by wuhao's avatar wuhao 🎯

asder

parent df6899c5
...@@ -140,6 +140,17 @@ export default [ ...@@ -140,6 +140,17 @@ export default [
name: "特殊配置", name: "特殊配置",
component: "./platform/Specialset", component: "./platform/Specialset",
}, },
{
path: "/platform/sendset",
name: "推送配置",
component: "./platform/Sendset",
},
{
path: "/platform/sendlist",
name: "推送记录",
component: "./platform/Sendlist",
},
{ {
path: "/platform/rule", path: "/platform/rule",
name: "编号规则", name: "编号规则",
......
...@@ -382,7 +382,7 @@ class Mtable extends PureComponent { ...@@ -382,7 +382,7 @@ class Mtable extends PureComponent {
}, },
}} }}
scroll={{ scroll={{
x: 1024, x: x ?? 1024,
}} }}
{...tabledataProps} {...tabledataProps}
{...expandable} {...expandable}
......
import React, { useEffect, useRef, useState } from 'react';
import { Button, Drawer } from 'antd';
import { connect, useModel } from "umi";
import AutoTable from '@/components/AutoTable';
import getPrem from '@/utils/getPrem';//权限判断fn
import Details from "@/components/Details";
let SendList = (props) => {
const { global, dispatch } = props;
const actionRef = useRef(),
[details, cdetails] = useState({
totalTitle: "推送记录详情",
visible: false,
dataSource: {},
totalCard: []
});
let columns = [
{
"title": "推送时间",
"dataIndex": "sendTime",
"key": "sendTimeList",
"valueType": "dateRange"
},
{
"title": "接收用户",
"dataIndex": "userName",
"key": "userName"
},
{
"title": "推送方式",
"dataIndex": "sendMethodName",
"key": "sendMethodName",
search:false
},
{
"title": "推送内容",
"dataIndex": "msgContent",
"key": "msgContent"
},
{
"title": "状态",
"dataIndex": "sendResultName",
"key": "sendResult",
"valueType": "select",
options: [
{
"label": "成功",
"value": 1
},
{
"label": "失败",
"value": 2
}
]
},
{
title: '操作',
valueType: 'option',
width: 120,
render: (text, row, _, action) => extraAction(text, row, _, action)
},
]
function extraAction(text, record, _, action) {
return (
<div>
{
getPrem(true, null, "查看详情", () => {
cdetails(details => {
return {
...details,
visible: true,
dataSource: record,
totalCard: [
{ //每一个模块信息
cardTitle: '记录详情',
itemData: [
{
"title": "推送时间",
"key": "sendTime"
},
{
"title": "接收用户",
"key": "userName"
},
{
"title": "推送方式",
"key": "sendMethodName"
},
{
"title": "消息标题",
"key": "msgTitle",
col: { span: 24 }
},
{
"title": "消息内容",
"key": "msgContent",
col: { span: 24 }
}
]
}
]
}
})
})
}
</div>
);
}
// let extrarender = ([<Button type="primary" onClick={() => {
// }}>导出</Button>])
return (
<div>
<AutoTable
pagetitle={props.route.name} //页面标题
// pageextra={extrarender} //页面操作 新增or批量删除
columns={columns}
actionRef={actionRef}
path="/ngic-base-business/paMsgSendRecord/queryList"
></AutoTable>
<Drawer
title={details.totalTitle}
closable={true}
visible={details.visible}
onClose={() => { cdetails({ ...details, visible: false }) }}
destroyOnClose={true}
afterVisibleChange={(v) => {
cdetails({
...details,
shown: v
})
}}
width="100%"
className="drawerDetails"
>
{details.shown && <Details {...details}></Details>}
</Drawer>
</div>
)
}
export default SendList
\ No newline at end of file
This diff is collapsed.
import { paBusinessMsgScene } from "@/services/platform";
import { doFetch } from "@/utils/doFetch";
import regValue from "@/utils/regValue";
let numReg = regValue("integer");
const addFields = {
"businessMsgSceneId": {
"value": null,
"type": "select",
"title": "推送类型",
"name": [
"businessMsgSceneId"
],
"required": true,
"options": {
"database": paBusinessMsgScene,
"params": {}
}
},
"sendMethodType": {
"value": null,
"type": "select",
"title": "推送方式",
"name": [
"sendMethodType"
],
"required": true,
"options": [
{
"label": "企业微信",
"value": 1
},{
"label": "邮件",
"value": 2
}
]
},
"fitField": {
"value": null,
"type": "select",
"title": "适用类型",
"name": [
"fitField"
],
"required": true,
"options": [
{
"label": "全部",
"value": 1
},
{
"label": "组织",
"value": 2
},
{
"label": "部门",
"value": 3
},
{
"label": "工厂",
"value": 4
},
{
"label": "车间",
"value":5
}
]
},
"fieldId": {
"value": null,
"type": "select",
"title": "类型名称",
"name": [
"fieldId"
],
"required": true,
"hides":false,
"options":[]
}
},
tableField={
"sendProcess": {
"value": null,
"type": "select",
"title": "推送流程",
"name": [
"sendProcess"
],
"required": true,
options:[
{
label:"一级通知",
value:1
},
{
label:"二级通知",
value:2
},
{
label:"三级通知",
value:3
},
{
label:"四级通知",
value:4
},
{
label:"五级通知",
value:5
},
{
label:"六级通知",
value:6
},
{
label:"七级通知",
value:7
},
{
label:"八级通知",
value:8
}
]
},
"sendTo": {
"value": null,
"type": "select",
"title": "推送对象",
"name": [
"sendTo"
],
"required": true,
"options": [
{
"label": "指定人员",
"value": 1
},
{
"label": "可指定人员",
"value": 2
},
{
"label": "创建人",
"value": 3
},
{
"label": "(指定人员)上级领导",
"value": 4
},
{
"label": "(上个通知人员)上级领导",
"value": 5
},
{
"label": "选择角色",
"value": 6
},
{
"label": "选择人员",
"value": 7
}
]
},
"targetIdList": {
"value": null,
"type": "select",
"title": "选择对象",
"name": [
"targetIdList"
],
"required": true,
"options": [],
hides:true,
multiple:true
},
"initialTime": {
"value": null,
"type": "inputnumber",
"title": "初始触发时长",
"name": [
"initialTime"
],
"required": true,
min:0,
...numReg
},
"initialUnit": {
"value": null,
"type": "select",
"title": "初始触发时长单位",
"name": [
"initialUnit"
],
"required": true,
"options": [
{
"label": "分钟",
"value": 1
},
{
"label": "小时",
"value": 2
},
{
"label": "天",
"value": 3
}
]
},
"intervalTime": {
"value": null,
"type": "inputnumber",
"title": "间隔时长",
"name": [
"intervalTime"
],
"required": true,
min:1,
...numReg
},
"intervalUnit": {
"value": null,
"type": "select",
"title": "间隔时长单位",
"name": [
"intervalUnit"
],
"required": true,
"options": [
{
"label": "分钟",
"value": 1
},
{
"label": "小时",
"value": 2
},
{
"label": "天",
"value": 3
}
]
},
"sendNum": {
"value": null,
"type": "inputnumber",
"title": "触发次数",
"name": [
"sendNum"
],
"required": true,
min:1,
...numReg
}
};
export {addFields, tableField}
\ No newline at end of file
This diff is collapsed.
...@@ -47,3 +47,18 @@ export async function bmTableFileSelect(params) { ...@@ -47,3 +47,18 @@ export async function bmTableFileSelect(params) {
data: params, data: params,
}); });
} }
//推送类型下拉
export async function paBusinessMsgScene(params) {
return request(`/wms/ngic-base-business/paBusinessMsgScene/queryAllForSelect`, {
method: 'POST',
data: params,
});
}
//推送配置
export async function paBusinessMsgOption(params) {
return request(`/wms/ngic-base-business/paBusinessMsgOption/queryById`, {
method: 'POST',
data: params,
});
}
\ No newline at end of file
...@@ -43,6 +43,13 @@ export async function storeselectionBox(params) { ...@@ -43,6 +43,13 @@ export async function storeselectionBox(params) {
data: params, data: params,
}); });
} }
//全部部门下拉
export async function allDepartment(params) {
return request(`/wms/ngic-auth/sysDepartment/query/selectbox/depart`, {
method: 'POST',
data: params,
});
}
//根据工厂id查询车间下拉 //根据工厂id查询车间下拉
export async function shopSelectByFactory(params) { export async function shopSelectByFactory(params) {
...@@ -168,3 +175,38 @@ export async function shiftSelectByShopId(params) { ...@@ -168,3 +175,38 @@ export async function shiftSelectByShopId(params) {
data: params, data: params,
}); });
} }
//角色下拉框
export async function roleList(params) {
return request(`/wms/ngic-auth/sysRole/queryAllSelectList`, {
method: 'POST',
data: params,
});
}
//集团下拉框
export async function factory(params) {
return request(`/wms/ngic-auth/sysDepartment/query/selectbox/factory`, {
method: 'POST',
data: params,
});
}
//下拉框---当前公司下
export async function currentUserList(params) {
return request(`/wms/ngic-auth/sysUser/query/selectbox/current/company`, {
method: 'POST',
data: params,
});
}
//当前公司所有工厂下拉
export async function allShop(params) {
return request(`/wms/ngic-auth/sysShop/query/selectbox/current/company`, {
method: 'POST',
data: params,
});
}
//当前公司所有车间下拉
export async function allSection(params) {
return request(`/wms/ngic-auth/sysSection/query/selectbox`, {
method: 'POST',
data: params,
});
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment