init
commit
ba265470a7
|
|
@ -0,0 +1,13 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# production
|
||||
/dist
|
||||
/demo
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.idea
|
||||
yarn.lock
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"prettier.enable": false,
|
||||
"editor.formatOnSave": false,
|
||||
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.organizeImports": "never"
|
||||
},
|
||||
|
||||
"eslint.rules.customizations": [
|
||||
{ "rule": "style/*", "severity": "off", "fixable": true },
|
||||
{ "rule": "format/*", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-order", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
||||
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
||||
{ "rule": "*semi", "severity": "off", "fixable": true }
|
||||
],
|
||||
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"vue",
|
||||
"html",
|
||||
"markdown",
|
||||
"json",
|
||||
"json5",
|
||||
"jsonc",
|
||||
"yaml",
|
||||
"toml",
|
||||
"xml",
|
||||
"gql",
|
||||
"graphql",
|
||||
"astro",
|
||||
"svelte",
|
||||
"css",
|
||||
"less",
|
||||
"scss",
|
||||
"pcss",
|
||||
"postcss"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
# 微应用模板说明文档
|
||||
|
||||
## 在线文档
|
||||
|
||||
https://www.yuque.com/buhangjiecheshen-ymbtb/qc0093/gxdun1dphetcurko
|
||||
|
||||
|
||||
## 安装依赖
|
||||
项目依赖可通过 **yarn** 或 **npm** 进行安装:
|
||||
|
||||
```bash
|
||||
# 使用 yarn
|
||||
yarn
|
||||
|
||||
# 或使用 npm
|
||||
npm i
|
||||
```
|
||||
|
||||
## 开发服务&打包应用
|
||||
|
||||
```bash
|
||||
# 启动开发服务
|
||||
yarn serve:<env>
|
||||
# 或
|
||||
npm run serve:<env>
|
||||
|
||||
# 开发环境打包
|
||||
yarn build:<env>
|
||||
# 或
|
||||
npm run build:<env>
|
||||
```
|
||||
|
||||
## 路由配置&路由访问&自动化路由
|
||||
所有页面必须放在`src/pages/container`目录下,启动访问页面请在浏览器地址栏输入`/<appIdentifier>/container/<你的路由页面文件名称>`
|
||||
解释:
|
||||
1. 所有页面组件命名为`index.js`或`index.jsx`,必须放在一个首字母大写的文件中。
|
||||
2. `container`为固定路径访问格式
|
||||
3. `<appIdentifier>`为应用的唯一标识符,也是应用路由的`basename`,在底座中用于区分其他应用。可在根目录 `jjb.config.js` 文件的 `appIdentifier` 节点中进行修改。
|
||||
4. 自动化路由将根据`pages/container`中的路由页面文件自动生成路由树。
|
||||
5. `id`匹配路由,文件夹命名`_id`
|
||||
|
||||
## 应用接口环境配置
|
||||
应用接口环境相关配置在根目录 `jjb.config.js` 文件的 `environment` 节点中进行定义。
|
||||
|
||||
## 应用开发服务配置
|
||||
应用开发服务相关配置在根目录 `jjb.config.js` 文件的 `server` 节点中进行定义。
|
||||
|
||||
## Babel 配置
|
||||
应用的 `Babel` 配置在根目录 `jjb.babel.js` 文件中进行管理。
|
||||
|
||||
## 目录说明
|
||||
|
||||
1. `src/api/` 配置各个 store 模块的接口数据。
|
||||
2. `src/components/` 全局公共组件。
|
||||
3. `src/enumerate/` 全局各种枚举配置。
|
||||
4. `src/pages/` 页面文件目录。
|
||||
5. `src/main.js` 应用的入口文件。
|
||||
|
||||
## 核心依赖
|
||||
1. `@cqsjjb/jjb-common-decorator`
|
||||
1. 公共装饰器库,内部包含:
|
||||
1. 按钮权限处理
|
||||
2. antd/Table 控制
|
||||
3. 文本重命名处理
|
||||
4. 具体使用方式可参考各个模块的 `d.ts`。
|
||||
2. `@cqsjjb/jjb-common-lib`
|
||||
1. 公共工具库,具体 API 使用请查看 `d.ts`
|
||||
3. `@cqsjjb/jjb-dva-runtime`
|
||||
1. 核心运行时,基于 `dvajs` 实现。
|
||||
1. 应用核心依赖模块
|
||||
2. 应用的自动化路由
|
||||
3. `store` 模块接口数据处理
|
||||
4. 均基于此依赖实现,具体使用方式请查看 `d.ts`。
|
||||
4. `@cqsjjb/jjb-react-admin-component`
|
||||
1. 公共组件库,具体组件使用方式请查看 `d.ts`。
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
_ooOoo_
|
||||
o8888888o
|
||||
88" . "88
|
||||
(| -_- |)
|
||||
O\ = /O
|
||||
____/`---'\____
|
||||
. ' \\| |// `.
|
||||
/ \\||| : |||// \
|
||||
/ _||||| -:- |||||- \
|
||||
| | \\\ - /// | |
|
||||
| \_| ''\---/'' | |
|
||||
\ .-\__ `-` ___/-. /
|
||||
___`. .' /--.--\ `. . __
|
||||
."" '< `.___\_<|>_/___.' >'"".
|
||||
| | : `- \`.;`\ _ /`;.`/ - ` : | |
|
||||
\ \ `-. \_ __\ /__ _/ .-` / /
|
||||
======`-.____`-.___\_____/___.-`____.-'======
|
||||
`=---='
|
||||
|
||||
.............................................
|
||||
佛祖保佑 永无BUG
|
||||
佛曰:
|
||||
写字楼里写字间,写字间里程序员;
|
||||
程序人员写程序,又拿程序换酒钱。
|
||||
酒醒只在网上坐,酒醉还来网下眠;
|
||||
酒醉酒醒日复日,网上网下年复年。
|
||||
但愿老死电脑间,不愿鞠躬老板前;
|
||||
奔驰宝马贵者趣,公交自行程序员。
|
||||
别人笑我忒疯癫,我笑自己命太贱;
|
||||
不见满街漂亮妹,哪个归得程序员?
|
||||
*/
|
||||
|
||||
const blessedByBuddha
|
||||
= "%c _ooOoo_\n"
|
||||
+ " o8888888o\n"
|
||||
+ " 88\" . \"88\n"
|
||||
+ " (| -_- |)\n"
|
||||
+ " O\\ = /O\n"
|
||||
+ " ____/`---'\\____\n"
|
||||
+ " . ' \\\\| |// `.\n"
|
||||
+ " / \\\\||| : |||// \\\n"
|
||||
+ " / _||||| -:- |||||- \\\n"
|
||||
+ " | | \\\\\\ - /// | |\n"
|
||||
+ " | \\_| ''\\---/'' | |\n"
|
||||
+ " \\ .-\\__ `-` ___/-. /\n"
|
||||
+ " ___`. .' /--.--\\ `. . __\n"
|
||||
+ " .\"\" '< `.___\\_<|>_/___.' >'\"\".\n"
|
||||
+ " | | : `- \\`.;`\\ _ /`;.`/ - ` : | |\n"
|
||||
+ " \\ \\ `-. \\_ __\\ /__ _/ .-` / /\n"
|
||||
+ " ======`-.____`-.___\\_____/___.-`____.-'======\n"
|
||||
+ " `=---='\n"
|
||||
+ "\n"
|
||||
+ "%c .............................................\n"
|
||||
+ " 佛祖保佑 永无BUG\n"
|
||||
+ "\n"
|
||||
+ "%c 佛曰:\n"
|
||||
+ " 写字楼里写字间,写字间里程序员;\n"
|
||||
+ " 程序人员写程序,又拿程序换酒钱。\n"
|
||||
+ " 酒醒只在网上坐,酒醉还来网下眠;\n"
|
||||
+ " 酒醉酒醒日复日,网上网下年复年。\n"
|
||||
+ " 但愿老死电脑间,不愿鞠躬老板前;\n"
|
||||
+ " 奔驰宝马贵者趣,公交自行程序员。\n"
|
||||
+ " 别人笑我忒疯癫,我笑自己命太贱;\n"
|
||||
+ " 不见满街漂亮妹,哪个归得程序员?";
|
||||
console.log(blessedByBuddha, "color:#ffd700", "color:red", "color:#1e80ff");
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
import antfu from "@antfu/eslint-config";
|
||||
|
||||
export default antfu({
|
||||
formatters: {
|
||||
html: false,
|
||||
css: true,
|
||||
},
|
||||
test: false,
|
||||
typescript: true,
|
||||
react: true,
|
||||
vue: false,
|
||||
markdown: false,
|
||||
stylistic: {
|
||||
semi: true,
|
||||
quotes: "double",
|
||||
},
|
||||
overrides: {
|
||||
react: {
|
||||
"react/no-comment-textnodes": "off",
|
||||
"react-hooks-extra/no-unnecessary-use-prefix": "off",
|
||||
"react-hooks-extra/prefer-use-state-lazy-initialization": "off",
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
"react/no-implicit-key": "off",
|
||||
},
|
||||
javascript: {
|
||||
"no-console": process.env.NODE_ENV === "production" ? "error" : "warn",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "warn",
|
||||
"no-alert": process.env.NODE_ENV === "production" ? "error" : "warn",
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
selector: "VariableDeclarator[id.name='pd']",
|
||||
message: "不允许使用 pd,请改用有语义化的变量名",
|
||||
},
|
||||
{
|
||||
selector: "ObjectExpression > Property[key.name='pd']",
|
||||
message: "不允许使用 pd,请改用有语义化的变量名",
|
||||
},
|
||||
],
|
||||
"no-unused-vars": ["error", { varsIgnorePattern: "^React$" }],
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"antfu/top-level-function": "off",
|
||||
"node/prefer-global/process": "off",
|
||||
"dot-notation": "off",
|
||||
"linebreak-style": ["off", "windows"],
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
module.exports = {
|
||||
compact: false,
|
||||
// 插件
|
||||
plugins: [
|
||||
[
|
||||
"@babel/plugin-proposal-decorators",
|
||||
{
|
||||
legacy: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
// 预设
|
||||
presets: [
|
||||
["@babel/preset-env", {
|
||||
targets: {
|
||||
browsers: ["ie >= 10"],
|
||||
},
|
||||
}],
|
||||
["@babel/preset-react", {
|
||||
runtime: "automatic",
|
||||
}],
|
||||
],
|
||||
};
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
module.exports = {
|
||||
// 应用后端git地址,部署上线需要
|
||||
javaGit: "<git-url>",
|
||||
// 应用后端仓库名称,部署上线需要
|
||||
javaGitName: "<git-name>",
|
||||
// 环境配置
|
||||
environment: {
|
||||
development: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
javaGitBranch: "<branch-name>",
|
||||
// 接口服务地址
|
||||
API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||
// API_HOST: "http://192.168.20.100:30140",
|
||||
},
|
||||
production: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
javaGitBranch: "<branch-name>",
|
||||
// 接口服务地址
|
||||
API_HOST: "",
|
||||
},
|
||||
},
|
||||
// 应用唯一标识符
|
||||
appIdentifier: "emergencyRescue",
|
||||
// 应用上下文注入全局变量
|
||||
contextInject: {
|
||||
// 应用Key
|
||||
appKey: "",
|
||||
// fileUrl: "http://192.168.20.240:9787/mnt/",
|
||||
fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
|
||||
},
|
||||
// public/index.html注入全局变量
|
||||
windowInject: {
|
||||
// 应用标题
|
||||
title: "微应用模板",
|
||||
// 注入css链接集合
|
||||
links: [],
|
||||
element: {
|
||||
root: {
|
||||
// 挂载DOM元素ID
|
||||
id: "root",
|
||||
},
|
||||
},
|
||||
// 注入js链接集合
|
||||
scripts: [],
|
||||
},
|
||||
// 开发服务
|
||||
server: {
|
||||
// 监听端口号
|
||||
port: "8033",
|
||||
// 服务地址
|
||||
host: "127.0.0.1",
|
||||
// 是否自动打开浏览器
|
||||
open: true,
|
||||
},
|
||||
// 框架
|
||||
framework: {
|
||||
// ant-design
|
||||
antd: {
|
||||
// 全局antd-class-name前缀
|
||||
"ant-prefix": "micro-temp",
|
||||
// 全局字体
|
||||
"fontFamily": "PingFangSC-Regular",
|
||||
// 全局主题色
|
||||
"colorPrimary": "#1677ff",
|
||||
// 全局圆角
|
||||
"borderRadius": 2,
|
||||
},
|
||||
},
|
||||
// webpack
|
||||
webpackConfig: {
|
||||
// 单页面插件
|
||||
htmlWebpackPluginOption: {
|
||||
// 自动注入编译后的文件到public/index.html中
|
||||
inject: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
"~/*": ["*"]
|
||||
},
|
||||
"jsx": "react"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "micro-app",
|
||||
"version": "2.0.0",
|
||||
"description": "建教帮微应用模板",
|
||||
"author": "JJB",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"serve": "node node_modules/@cqsjjb/scripts/webpack.dev.server.js",
|
||||
"build": "node node_modules/@cqsjjb/scripts/webpack.build.js",
|
||||
"push": "jjb-cmd push java production",
|
||||
"clean-cache": "rimraf node_modules/.cache/webpack",
|
||||
"serve:development": "cross-env NODE_ENV=development npm run serve",
|
||||
"serve:production": "cross-env NODE_ENV=production npm run serve",
|
||||
"build:development": "cross-env NODE_ENV=development npm run build",
|
||||
"build:production": "cross-env NODE_ENV=production npm run build",
|
||||
"code-optimization": "node node_modules/@cqsjjb/scripts/code-optimization.js",
|
||||
"lint": "eslint --ext .js,.jsx,.tsx --fix src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^5.6.1",
|
||||
"@ant-design/pro-components": "^2.8.10",
|
||||
"@cqsjjb/jjb-common-decorator": "latest",
|
||||
"@cqsjjb/jjb-common-lib": "latest",
|
||||
"@cqsjjb/jjb-dva-runtime": "latest",
|
||||
"@cqsjjb/jjb-react-admin-component": "latest",
|
||||
"ahooks": "^3.9.5",
|
||||
"antd": "^5.27.6",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"zy-react-library": "^1.2.20"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
"@babel/plugin-proposal-decorators": "^7.19.3",
|
||||
"@cqsjjb/scripts": "2.0.0",
|
||||
"@eslint-react/eslint-plugin": "^2.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-plugin-format": "^1.0.2",
|
||||
"eslint-plugin-react-hooks": "^7.0.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.23",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<!--BEGIN-->
|
||||
<!--<% var { env: $env, process: $process, mode: $mode, builtInfo: $builtInfo, links: $links, redirectLogin: $redirectLogin, framework: $framework, scripts: $scripts, element: $element } = htmlWebpackPlugin.options %>-->
|
||||
<!--<% var { appKey: $appKey, antd: $antd, basename: $basename, API_HOST: $API_HOST } = $process %>-->
|
||||
<!--<% var { ['ant-prefix']: $antPrefix, fontFamily: $fontFamily, colorPrimary: $colorPrimary, borderRadius: $borderRadius } = $antd %>-->
|
||||
<!--NED-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head data-built-info="<%= $builtInfo %>">
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="renderer" content="webkit"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover">
|
||||
<% for (const item of $links) { %>
|
||||
<link type="text/css" rel="stylesheet" href="<%= item %>"></link>
|
||||
<% } %>
|
||||
<title>--</title>
|
||||
<script>
|
||||
(function () {
|
||||
const APP_ENV = {
|
||||
antd: {
|
||||
'ant-prefix': '<%= $antPrefix %>',
|
||||
fontFamily: '<%= $fontFamily %>',
|
||||
colorPrimary: '<%= $colorPrimary %>',
|
||||
borderRadius: parseInt('<%= $borderRadius %>')
|
||||
},
|
||||
appKey: '<%= $appKey %>',
|
||||
basename: '<%= $basename %>',
|
||||
API_HOST: '<%= $API_HOST %>'
|
||||
};
|
||||
APP_ENV.API_HOST = sessionStorage.API_HOST || APP_ENV.API_HOST || window.location.origin;
|
||||
window.process = {
|
||||
env: { app: APP_ENV },
|
||||
NODE_ENV: '<%= $mode %>'
|
||||
};
|
||||
window.__JJB_ENVIRONMENT__ = {
|
||||
API_HOST: APP_ENV.API_HOST,
|
||||
redirect: '<%= $redirectLogin %>',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
<!-- SCRIPTS -->
|
||||
<% for (const item of $scripts) { %>
|
||||
<script src="<%= item %>" type="text/javascript"></script>
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
<!-- NOSCRIPT -->
|
||||
<noscript>此网页需要开启JavaScript功能。</noscript>
|
||||
<!-- MAIN -->
|
||||
<% const { root } = $element; %>
|
||||
<div id="<%= root.id %>" style="width: 100%; height: 100%; position: relative;overflow-y: auto"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
### 监管端
|
||||
- 应急资源管理/应急资源统计
|
||||
`/emergencyRescue/container/supervision/emergencyResource/emergencyResource/list`
|
||||
- 应急组织管理/应急专家队伍统计
|
||||
`/emergencyRescue/container/supervision/emergencyOrganization/emergencyExpertTeam/list`
|
||||
- 应急组织管理/应急通讯录统计
|
||||
`/emergencyRescue/container/supervision/emergencyOrganization/emergencyAddressBook/list`
|
||||
- 应急组织管理/专业保障机构统计
|
||||
`/emergencyRescue/container/supervision/emergencyOrganization/professionalGuaranteeOrganization/list`
|
||||
- 应急组织管理/应急机构统计
|
||||
`/emergencyRescue/container/supervision/emergencyOrganization/emergencyOrganization/list`
|
||||
- 应急组织管理/应急救援队伍统计
|
||||
`/emergencyRescue/container/supervision/emergencyOrganization/emergencyRescueTeam/list`
|
||||
- 预案与演练/企业预案统计
|
||||
`/emergencyRescue/container/supervision/planAndDrill/enterprisePlan/list`
|
||||
- 预案与演练/应急预案统计
|
||||
`/emergencyRescue/container/supervision/planAndDrill/emergencyPlan/list`
|
||||
- 预案与演练/应急演练统计
|
||||
`/emergencyRescue/container/supervision/planAndDrill/emergencyExercise/list`
|
||||
- 应急救援/企业值班管理/值班日志及排班登记统计
|
||||
`/emergencyRescue/container/supervision/emergencyRescue/enterpriseDuty/dutyLogAndSchedulingRegistration/list`
|
||||
- 应急救援/应急接报管理/事件接报统计
|
||||
`/emergencyRescue/container/supervision/emergencyRescue/emergencyEvent/eventReport/list`
|
||||
- 应急救援/救援统计
|
||||
`/emergencyRescue/container/supervision/emergencyRescue/rescue/list`
|
||||
- 应急救援/应急知识库/应急知识管理/应急知识库统计
|
||||
`/emergencyRescue/container/supervision/emergencyRescue/emergencyKnowledgeLibrary/emergencyKnowledge/emergencyKnowledgeLibrary/list`
|
||||
|
||||
|
||||
### 企业端
|
||||
- 应急资源管理/应急装备管理
|
||||
`/emergencyRescue/container/enterprise/emergencyResource/emergencyEquipment/list`
|
||||
- 应急资源管理/物资装备库
|
||||
`/emergencyRescue/container/enterprise/emergencyResource/materialEquipment/list`
|
||||
- 应急资源管理/应急避难场所
|
||||
`/emergencyRescue/container/enterprise/emergencyResource/emergencyShelter/list`
|
||||
- 应急资源管理/排水井
|
||||
`/emergencyRescue/container/enterprise/emergencyResource/drainageWell/list`
|
||||
- 应急资源管理/封闭卡口
|
||||
`/emergencyRescue/container/enterprise/emergencyResource/closedCardPort/list`
|
||||
- 应急组织管理/应急专家队伍管理/应急救援队伍
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyExpertTeam/expertEmergencyRescueTeam/list`
|
||||
- 应急组织管理/应急专家队伍管理/应急救援专家
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyExpertTeam/expertEmergencyRescueExpert/list`
|
||||
- 应急组织管理/应急专家队伍管理/应急救援专家组
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyExpertTeam/expertEmergencyRescueExpertGroup/list`
|
||||
- 应急组织管理/应急通讯录
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyAddressBook/list`
|
||||
- 应急组织管理/专业保障机构/运输保障机构信息管理
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/professionalGuaranteeOrganization/transportGuaranteeOrganization/list`
|
||||
- 应急组织管理/专业保障机构/医疗保障机构信息管理
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/professionalGuaranteeOrganization/medicalGuaranteeOrganization/list`
|
||||
- 应急组织管理/专业保障机构/通讯保障机构信息管理
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/professionalGuaranteeOrganization/communicationGuaranteeOrganization/list`
|
||||
- 应急组织管理/专业保障机构/技术支持机构信息管理
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/professionalGuaranteeOrganization/technicalSupportGuaranteeOrganization/list`
|
||||
- 应急组织管理/应急管理机构/企业应急机构
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyManagementOrganization/enterpriseEmergencyOrganization/list`
|
||||
- 应急组织管理/应急管理机构/企业应急人员
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyManagementOrganization/enterpriseEmergencyPersonnel/list`
|
||||
- 应急组织管理/应急救援队伍管理
|
||||
`/emergencyRescue/container/enterprise/emergencyOrganization/emergencyRescueTeam/list`
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const closedCardPortList = declareRequest(
|
||||
"closedCardPortLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const closedCardPortInfo = declareRequest(
|
||||
"closedCardPortLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const closedCardPortAdd = declareRequest(
|
||||
"closedCardPortLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const closedCardPortUpdate = declareRequest(
|
||||
"closedCardPortLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const closedCardPortDelete = declareRequest(
|
||||
"closedCardPortLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const closedCardPortDeleteBatch = declareRequest(
|
||||
"closedCardPortLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const communicationGuaranteeOrganizationList = declareRequest(
|
||||
"communicationGuaranteeOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const communicationGuaranteeOrganizationInfo = declareRequest(
|
||||
"communicationGuaranteeOrganizationLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const communicationGuaranteeOrganizationAdd = declareRequest(
|
||||
"communicationGuaranteeOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const communicationGuaranteeOrganizationUpdate = declareRequest(
|
||||
"communicationGuaranteeOrganizationLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const communicationGuaranteeOrganizationDelete = declareRequest(
|
||||
"communicationGuaranteeOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const communicationGuaranteeOrganizationDeleteBatch = declareRequest(
|
||||
"communicationGuaranteeOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const drainageWellList = declareRequest(
|
||||
"drainageWellLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const drainageWellInfo = declareRequest(
|
||||
"drainageWellLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const drainageWellAdd = declareRequest(
|
||||
"drainageWellLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const drainageWellUpdate = declareRequest(
|
||||
"drainageWellLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const drainageWellDelete = declareRequest(
|
||||
"drainageWellLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const drainageWellDeleteBatch = declareRequest(
|
||||
"drainageWellLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const emergencyAddressBookList = declareRequest(
|
||||
"emergencyAddressBookLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookInfo = declareRequest(
|
||||
"emergencyAddressBookLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookAdd = declareRequest(
|
||||
"emergencyAddressBookLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookUpdate = declareRequest(
|
||||
"emergencyAddressBookLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookDelete = declareRequest(
|
||||
"emergencyAddressBookLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookMemberList = declareRequest(
|
||||
"emergencyAddressBookMemberLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookMemberInfo = declareRequest(
|
||||
"emergencyAddressBookMemberLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookMemberAdd = declareRequest(
|
||||
"emergencyAddressBookMemberLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookMemberUpdate = declareRequest(
|
||||
"emergencyAddressBookMemberLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookMemberDelete = declareRequest(
|
||||
"emergencyAddressBookMemberLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookMemberDeleteBatch = declareRequest(
|
||||
"emergencyAddressBookMemberLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const emergencyEquipmentList = declareRequest(
|
||||
"emergencyEquipmentLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyEquipmentInfo = declareRequest(
|
||||
"emergencyEquipmentLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const emergencyEquipmentAdd = declareRequest(
|
||||
"emergencyEquipmentLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyEquipmentUpdate = declareRequest(
|
||||
"emergencyEquipmentLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyEquipmentDelete = declareRequest(
|
||||
"emergencyEquipmentLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyEquipmentDeleteBatch = declareRequest(
|
||||
"emergencyEquipmentLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const emergencyRescueTeamList = declareRequest(
|
||||
"emergencyRescueTeamLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyRescueTeamInfo = declareRequest(
|
||||
"emergencyRescueTeamLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const emergencyRescueTeamAdd = declareRequest(
|
||||
"emergencyRescueTeamLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyRescueTeamUpdate = declareRequest(
|
||||
"emergencyRescueTeamLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyRescueTeamDelete = declareRequest(
|
||||
"emergencyRescueTeamLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyRescueTeamDeleteBatch = declareRequest(
|
||||
"emergencyRescueTeamLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const emergencyShelterList = declareRequest(
|
||||
"emergencyShelterLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyShelterInfo = declareRequest(
|
||||
"emergencyShelterLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const emergencyShelterAdd = declareRequest(
|
||||
"emergencyShelterLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyShelterUpdate = declareRequest(
|
||||
"emergencyShelterLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyShelterDelete = declareRequest(
|
||||
"emergencyShelterLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyShelterDeleteBatch = declareRequest(
|
||||
"emergencyShelterLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const enterpriseEmergencyOrganizationList = declareRequest(
|
||||
"enterpriseEmergencyOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyOrganizationListAll = declareRequest(
|
||||
"enterpriseEmergencyOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyOrganizationInfo = declareRequest(
|
||||
"enterpriseEmergencyOrganizationLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyOrganizationAdd = declareRequest(
|
||||
"enterpriseEmergencyOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyOrganizationUpdate = declareRequest(
|
||||
"enterpriseEmergencyOrganizationLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyOrganizationDelete = declareRequest(
|
||||
"enterpriseEmergencyOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyOrganizationDeleteBatch = declareRequest(
|
||||
"enterpriseEmergencyOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const enterpriseEmergencyPersonnelList = declareRequest(
|
||||
"enterpriseEmergencyPersonnelLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyPersonnelInfo = declareRequest(
|
||||
"enterpriseEmergencyPersonnelLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyPersonnelAdd = declareRequest(
|
||||
"enterpriseEmergencyPersonnelLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyPersonnelUpdate = declareRequest(
|
||||
"enterpriseEmergencyPersonnelLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyPersonnelDelete = declareRequest(
|
||||
"enterpriseEmergencyPersonnelLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const enterpriseEmergencyPersonnelDeleteBatch = declareRequest(
|
||||
"enterpriseEmergencyPersonnelLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const expertEmergencyRescueExpertList = declareRequest(
|
||||
"expertEmergencyRescueExpertLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertInfo = declareRequest(
|
||||
"expertEmergencyRescueExpertLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertAdd = declareRequest(
|
||||
"expertEmergencyRescueExpertLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertUpdate = declareRequest(
|
||||
"expertEmergencyRescueExpertLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertDelete = declareRequest(
|
||||
"expertEmergencyRescueExpertLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertDeleteBatch = declareRequest(
|
||||
"expertEmergencyRescueExpertLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const expertEmergencyRescueExpertGroupList = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupInfo = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupAdd = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupUpdate = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupDelete = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupDeleteBatch = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertList = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertAdd = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDelete = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDeleteBatch = declareRequest(
|
||||
"expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const expertEmergencyRescueTeamList = declareRequest(
|
||||
"expertEmergencyRescueTeamLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueTeamInfo = declareRequest(
|
||||
"expertEmergencyRescueTeamLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueTeamAdd = declareRequest(
|
||||
"expertEmergencyRescueTeamLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueTeamUpdate = declareRequest(
|
||||
"expertEmergencyRescueTeamLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueTeamDelete = declareRequest(
|
||||
"expertEmergencyRescueTeamLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescueTeamDeleteBatch = declareRequest(
|
||||
"expertEmergencyRescueTeamLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescuePersonnelList = declareRequest(
|
||||
"expertEmergencyRescuePersonnelLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescuePersonnelInfo = declareRequest(
|
||||
"expertEmergencyRescuePersonnelLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescuePersonnelAdd = declareRequest(
|
||||
"expertEmergencyRescuePersonnelLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescuePersonnelUpdate = declareRequest(
|
||||
"expertEmergencyRescuePersonnelLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescuePersonnelDelete = declareRequest(
|
||||
"expertEmergencyRescuePersonnelLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const expertEmergencyRescuePersonnelDeleteBatch = declareRequest(
|
||||
"expertEmergencyRescuePersonnelLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export {};
|
||||
|
||||
export const corpInfoListAll = declareRequest(
|
||||
"globalLoading",
|
||||
"Get > /basicInfo/corpInfo/listAll",
|
||||
);
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const materialEquipmentList = declareRequest(
|
||||
"materialEquipmentLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const materialEquipmentInfo = declareRequest(
|
||||
"materialEquipmentLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const materialEquipmentAdd = declareRequest(
|
||||
"materialEquipmentLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const materialEquipmentUpdate = declareRequest(
|
||||
"materialEquipmentLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const materialEquipmentDelete = declareRequest(
|
||||
"materialEquipmentLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const materialEquipmentDeleteBatch = declareRequest(
|
||||
"materialEquipmentLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const facilitiesEquipmentList = declareRequest(
|
||||
"facilitiesEquipmentLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const facilitiesEquipmentInfo = declareRequest(
|
||||
"facilitiesEquipmentLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const facilitiesEquipmentAdd = declareRequest(
|
||||
"facilitiesEquipmentLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const facilitiesEquipmentUpdate = declareRequest(
|
||||
"facilitiesEquipmentLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const facilitiesEquipmentDelete = declareRequest(
|
||||
"facilitiesEquipmentLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const facilitiesEquipmentDeleteBatch = declareRequest(
|
||||
"facilitiesEquipmentLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const rescueEquipmentList = declareRequest(
|
||||
"rescueEquipmentLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const rescueEquipmentInfo = declareRequest(
|
||||
"rescueEquipmentLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const rescueEquipmentAdd = declareRequest(
|
||||
"rescueEquipmentLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const rescueEquipmentUpdate = declareRequest(
|
||||
"rescueEquipmentLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const rescueEquipmentDelete = declareRequest(
|
||||
"rescueEquipmentLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const rescueEquipmentDeleteBatch = declareRequest(
|
||||
"rescueEquipmentLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const materialList = declareRequest(
|
||||
"materialLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const materialInfo = declareRequest(
|
||||
"materialLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const materialAdd = declareRequest(
|
||||
"materialLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const materialUpdate = declareRequest(
|
||||
"materialLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const materialDelete = declareRequest(
|
||||
"materialLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const materialDeleteBatch = declareRequest(
|
||||
"materialLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const medicalGuaranteeOrganizationList = declareRequest(
|
||||
"medicalGuaranteeOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const medicalGuaranteeOrganizationInfo = declareRequest(
|
||||
"medicalGuaranteeOrganizationLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const medicalGuaranteeOrganizationAdd = declareRequest(
|
||||
"medicalGuaranteeOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const medicalGuaranteeOrganizationUpdate = declareRequest(
|
||||
"medicalGuaranteeOrganizationLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const medicalGuaranteeOrganizationDelete = declareRequest(
|
||||
"medicalGuaranteeOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const medicalGuaranteeOrganizationDeleteBatch = declareRequest(
|
||||
"medicalGuaranteeOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const emergencyResourceStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyExpertTeamStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyAddressBookStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const professionalGuaranteeOrganizationStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyOrganizationStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyRescueTeamStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const enterprisePlanStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyPlanStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyExerciseStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const dutyLogAndSchedulingRegistrationStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const eventReportStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const rescueStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const emergencyKnowledgeLibraryStatisticsList = declareRequest(
|
||||
"statisticsLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const technicalSupportGuaranteeOrganizationList = declareRequest(
|
||||
"technicalSupportGuaranteeOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const technicalSupportGuaranteeOrganizationInfo = declareRequest(
|
||||
"technicalSupportGuaranteeOrganizationLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const technicalSupportGuaranteeOrganizationAdd = declareRequest(
|
||||
"technicalSupportGuaranteeOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const technicalSupportGuaranteeOrganizationUpdate = declareRequest(
|
||||
"technicalSupportGuaranteeOrganizationLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const technicalSupportGuaranteeOrganizationDelete = declareRequest(
|
||||
"technicalSupportGuaranteeOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const technicalSupportGuaranteeOrganizationDeleteBatch = declareRequest(
|
||||
"technicalSupportGuaranteeOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const transportGuaranteeOrganizationList = declareRequest(
|
||||
"transportGuaranteeOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const transportGuaranteeOrganizationInfo = declareRequest(
|
||||
"transportGuaranteeOrganizationLoading",
|
||||
"Get > /emergencyRescue",
|
||||
);
|
||||
export const transportGuaranteeOrganizationAdd = declareRequest(
|
||||
"transportGuaranteeOrganizationLoading",
|
||||
"Post > @/emergencyRescue",
|
||||
);
|
||||
export const transportGuaranteeOrganizationUpdate = declareRequest(
|
||||
"transportGuaranteeOrganizationLoading",
|
||||
"Put > @/emergencyRescue",
|
||||
);
|
||||
export const transportGuaranteeOrganizationDelete = declareRequest(
|
||||
"transportGuaranteeOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
export const transportGuaranteeOrganizationDeleteBatch = declareRequest(
|
||||
"transportGuaranteeOrganizationLoading",
|
||||
"Delete > @/emergencyRescue",
|
||||
);
|
||||
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* 全局常量定义
|
||||
*/
|
||||
|
||||
export {};
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* 全局上下文定义
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
|
||||
// 获取antd全局静态方法
|
||||
export const InjectContext = React.createContext({});
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* 全局数据状态管理模块定义
|
||||
*/
|
||||
|
||||
import { defineNamespace } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const NS_GLOBAL = defineNamespace("global");
|
||||
export const NS_STATISTICS = defineNamespace("statistics");
|
||||
export const NS_EMERGENCY_EQUIPMENT = defineNamespace("emergencyEquipment");
|
||||
export const NS_MATERIAL_EQUIPMENT = defineNamespace("materialEquipment");
|
||||
export const NS_EMERGENCY_SHELTER = defineNamespace("emergencyShelter");
|
||||
export const NS_DRAINAGE_WELL = defineNamespace("drainageWell");
|
||||
export const NS_CLOSED_CARD_PORT = defineNamespace("closedCardPort");
|
||||
export const NS_EXPERT_EMERGENCY_RESCUE_TEAM = defineNamespace("expertEmergencyRescueTeam");
|
||||
export const NS_EXPERT_EMERGENCY_RESCUE_EXPERT = defineNamespace("expertEmergencyRescueExpert");
|
||||
export const NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP = defineNamespace("expertEmergencyRescueExpertGroup");
|
||||
export const NS_EMERGENCY_ADDRESS_BOOK = defineNamespace("emergencyAddressBook");
|
||||
export const NS_TRANSPORT_GUARANTEE_ORGANIZATION = defineNamespace("transportGuaranteeOrganization");
|
||||
export const NS_MEDICAL_GUARANTEE_ORGANIZATION = defineNamespace("medicalGuaranteeOrganization");
|
||||
export const NS_COMMUNICATION_GUARANTEE_ORGANIZATION = defineNamespace("communicationGuaranteeOrganization");
|
||||
export const NS_TECHNICAL_SUPPORT_GUARANTEE_ORGANIZATION = defineNamespace("technicalSupportGuaranteeOrganization");
|
||||
export const NS_ENTERPRISE_EMERGENCY_ORGANIZATION = defineNamespace("enterpriseEmergencyOrganization");
|
||||
export const NS_ENTERPRISE_EMERGENCY_PERSONNEL = defineNamespace("enterpriseEmergencyPersonnel");
|
||||
export const NS_EMERGENCY_RESCUE_TEAM = defineNamespace("emergencyRescueTeam");
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
import { setJJBCommonAntdMessage } from "@cqsjjb/jjb-common-lib";
|
||||
import { setup } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { getFileUrlFromServer } from "zy-react-library/utils";
|
||||
import "dayjs/locale/zh-cn";
|
||||
import "../blessed_by_buddha";
|
||||
|
||||
require("antd/dist/reset.css");
|
||||
require("zy-react-library/css/common.less");
|
||||
|
||||
dayjs.locale("zh-cn");
|
||||
setJJBCommonAntdMessage(message);
|
||||
|
||||
const app = setup();
|
||||
getFileUrlFromServer();
|
||||
// 非底座环境运行
|
||||
if (!window.__POWERED_BY_QIANKUN__) {
|
||||
// 云组件默认依赖
|
||||
window.__coreLib = {};
|
||||
window.__coreLib.React = require("react");
|
||||
window.__coreLib.ReactDOM = require("react-dom");
|
||||
window.__coreLib.jjbCommonLib = require("@cqsjjb/jjb-common-lib");
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 挂载
|
||||
* @param props {{ setGlobalState: ({ rendered: boolean }) => void }}
|
||||
* @returns {Promise<*>} ''
|
||||
*/
|
||||
export const mount = async (props) => {
|
||||
// 云组件默认依赖
|
||||
window.__coreLib.React = require("react");
|
||||
window.__coreLib.ReactDOM = require("react-dom");
|
||||
window.__coreLib.jjbCommonLib = require("@cqsjjb/jjb-common-lib");
|
||||
app.mount(props);
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 卸载
|
||||
* @param props {object}
|
||||
* @returns {Promise<*>} ''
|
||||
*/
|
||||
export const unmount = async props => app.unmount(props);
|
||||
/**
|
||||
* @description 启动
|
||||
* @param props
|
||||
*/
|
||||
export const bootstrap = async props => app.bootstrap(props);
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space, Tag } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_EMERGENCY_ADDRESS_BOOK } from "~/enumerate/namespace";
|
||||
|
||||
const defaultParentId = 0;
|
||||
const defaultParentName = "(无)此项为顶级分组";
|
||||
const addModalTypeNames = {
|
||||
add: "新增",
|
||||
update: "编辑",
|
||||
addChild: "添加下级通讯组",
|
||||
};
|
||||
|
||||
function List(props) {
|
||||
const [parentId, setParentId] = useState(defaultParentId);
|
||||
const [parentName, setParentName] = useState(defaultParentName);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||
const [addModalType, setAddModalType] = useState("");
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["emergencyAddressBookList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["emergencyAddressBookDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "通讯录名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
setAddModalVisible(true);
|
||||
setAddModalType("add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "组名称", dataIndex: "todo" },
|
||||
{ title: "组类型", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 300,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./member/list?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
成员管理
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setAddModalVisible(true);
|
||||
setAddModalType("update");
|
||||
setParentId(record.parentId);
|
||||
setParentName(record.parentName);
|
||||
setCurrentId(record.id);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setAddModalVisible(true);
|
||||
setAddModalType("addChild");
|
||||
setParentId(record.parentId);
|
||||
setParentName(record.parentName);
|
||||
}}
|
||||
>
|
||||
添加下级通讯组
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
{
|
||||
addModalVisible && (
|
||||
<AddModal
|
||||
parentId={parentId}
|
||||
parentName={parentName}
|
||||
id={currentId}
|
||||
addModalType={addModalType}
|
||||
getData={getData}
|
||||
onCancel={() => {
|
||||
setAddModalVisible(false);
|
||||
setParentId(defaultParentId);
|
||||
setParentName(defaultParentName);
|
||||
setCurrentId("");
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
const AddModalComponent = (props) => {
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (props.id) {
|
||||
const { data } = await props["emergencyAddressBookInfo"]({ id: props.id });
|
||||
form.setFieldsValue(data);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[props.id ? "emergencyAddressBookUpdate" : "emergencyAddressBookAdd"]({
|
||||
...values,
|
||||
parentId: props.parentId,
|
||||
id: props.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(`${addModalTypeNames[props.addModalType]}成功`);
|
||||
props.onCancel();
|
||||
props.getData();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open
|
||||
title={addModalTypeNames[props.addModalType]}
|
||||
maskClosable={false}
|
||||
width={600}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
confirmLoading={props.emergencyAddressBook.emergencyAddressBookLoading}
|
||||
>
|
||||
<FormBuilder
|
||||
loading={props.emergencyAddressBook.emergencyAddressBookLoading}
|
||||
options={[
|
||||
{ key: "parentName", label: "上级通讯录", render: (<Tag color="#4096ff">{props.parentName}</Tag>) },
|
||||
{ name: "todo", label: "通讯录名称" },
|
||||
{ name: "todo", label: "组类型", render: (<DictionarySelect dictValue="emergencyAddressBookGroupType" />) },
|
||||
]}
|
||||
labelCol={{ span: 10 }}
|
||||
span={24}
|
||||
showActionButtons={false}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const AddModal = Connect([NS_EMERGENCY_ADDRESS_BOOK], true)(AddModalComponent);
|
||||
export default Connect([NS_EMERGENCY_ADDRESS_BOOK], true)(List);
|
||||
|
|
@ -0,0 +1,282 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { PHONE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_EMERGENCY_ADDRESS_BOOK } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||
const [infoModalVisible, setInfoModalVisible] = useState(false);
|
||||
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["emergencyAddressBookMemberList"], {
|
||||
form,
|
||||
params: { emergencyRescueExpertId: query.id },
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["emergencyAddressBookMemberDelete"]({
|
||||
id: record.id,
|
||||
emergencyRescueExpertId: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["emergencyAddressBookMemberDeleteBatch"]({
|
||||
ids: selectedRowKeys,
|
||||
emergencyRescueExpertId: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle="成员管理">
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "人员姓名" },
|
||||
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
setAddModalVisible(true);
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "姓名", dataIndex: "todo" },
|
||||
{ title: "性别", dataIndex: "todo" },
|
||||
{ title: "移动电话", dataIndex: "todo" },
|
||||
{ title: "办公电话", dataIndex: "todo" },
|
||||
{ title: "所属部门", dataIndex: "todo" },
|
||||
{ title: "职务", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 300,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setInfoModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setAddModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
{
|
||||
addModalVisible && (
|
||||
<AddModal
|
||||
id={currentId}
|
||||
emergencyRescueExpertId={query.id}
|
||||
getData={getData}
|
||||
onCancel={() => {
|
||||
setAddModalVisible(false);
|
||||
setCurrentId("");
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
infoModalVisible && (
|
||||
<ViewModal
|
||||
id={currentId}
|
||||
onCancel={() => {
|
||||
setInfoModalVisible(false);
|
||||
setCurrentId("");
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
const AddModalComponent = (props) => {
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (props.id) {
|
||||
const { data } = await props["emergencyAddressBookMemberInfo"]({ id: props.id });
|
||||
form.setFieldsValue(data);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[props.id ? "emergencyAddressBookMemberUpdate" : "emergencyAddressBookMemberAdd"]({
|
||||
...values,
|
||||
id: props.id,
|
||||
emergencyRescueExpertId: props.emergencyRescueExpertId,
|
||||
});
|
||||
if (success) {
|
||||
message.success(`${props.id ? "编辑" : "添加"}成功`);
|
||||
props.onCancel();
|
||||
props.getData();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open
|
||||
title={props.id ? "编辑" : "添加"}
|
||||
maskClosable={false}
|
||||
width={600}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
confirmLoading={props.emergencyAddressBook.emergencyAddressBookMemberLoading}
|
||||
>
|
||||
<FormBuilder
|
||||
loading={props.emergencyAddressBook.emergencyAddressBookMemberLoading}
|
||||
options={[
|
||||
{ name: "todo", label: "姓名" },
|
||||
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) },
|
||||
{ name: "todo", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }] },
|
||||
{ name: "todo", label: "移动电话", rules: [{ pattern: PHONE, message: "请输入正确的移动电话" }] },
|
||||
{ name: "todo", label: "所属部门" },
|
||||
{ name: "todo", label: "职务" },
|
||||
]}
|
||||
labelCol={{ span: 8 }}
|
||||
span={24}
|
||||
showActionButtons={false}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const ViewModalComponent = (props) => {
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["emergencyAddressBookMemberInfo"]({ id: props.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open
|
||||
title="查看"
|
||||
maskClosable={false}
|
||||
width={600}
|
||||
onCancel={props.onCancel}
|
||||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>关闭</Button>,
|
||||
]}
|
||||
loading={props.emergencyAddressBook.emergencyAddressBookMemberLoading}
|
||||
>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={1}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "姓名", children: info.todo },
|
||||
{ label: "性别", children: info.todo },
|
||||
{ label: "办公电话", children: info.todo },
|
||||
{ label: "移动电话", children: info.todo },
|
||||
{ label: "所属部门", children: info.todo },
|
||||
{ label: "职务", children: info.todo },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const AddModal = Connect([NS_EMERGENCY_ADDRESS_BOOK], true)(AddModalComponent);
|
||||
const ViewModal = Connect([NS_EMERGENCY_ADDRESS_BOOK], true)(ViewModalComponent);
|
||||
export default Connect([NS_EMERGENCY_ADDRESS_BOOK], true)(List);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Member(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default Member;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EmergencyAddressBook(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EmergencyAddressBook;
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import BasicSelect from "zy-react-library/components/Select/Basic";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import nation from "zy-react-library/json/nation.json";
|
||||
import { ID_NUMBER, PHONE, POSTAL_CODE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_EXPERT } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["expertEmergencyRescueExpertInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "expertEmergencyRescueExpertUpdate" : "expertEmergencyRescueExpertAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.expertEmergencyRescueExpert.expertEmergencyRescueExpertLoading}
|
||||
useAutoGenerateRequired={false}
|
||||
options={[
|
||||
{ name: "todo", label: "专家姓名", rules: [{ required: true, message: "请输入专家姓名" }] },
|
||||
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) },
|
||||
{ name: "todo", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] },
|
||||
{ name: "todo", label: "出生日期", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo", label: "专家类型", render: (<DictionarySelect dictValue="emergencyRescueExpertType" />) },
|
||||
{ name: "todo", label: "专家密级", render: (<DictionarySelect dictValue="emergencyRescueExpertLevel" />) },
|
||||
{ name: "todo", label: "职称" },
|
||||
{ name: "todo", label: "专业类型" },
|
||||
{ name: "todo", label: "民族", render: (<BasicSelect data={nation} />) },
|
||||
{ name: "todo", label: "政治面貌", render: (<DictionarySelect dictValue="zhengzhimianmao" />) },
|
||||
{ name: "todo", label: "最高学历", render: (<DictionarySelect dictValue="wenhuachengdu" />) },
|
||||
{ name: "todo", label: "参加工作时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }] },
|
||||
{ name: "todo", label: "家庭电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的家庭电话" }] },
|
||||
{ name: "todo", label: "移动电话", rules: [{ pattern: PHONE, message: "请输入正确的移动电话" }] },
|
||||
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] },
|
||||
{ name: "todo", label: "电子邮箱", rules: [{ type: "email", message: "请输入正确的电子邮箱" }] },
|
||||
{ name: "todo", label: "健康状况" },
|
||||
{ name: "todo", label: "行政职务", render: (<DictionarySelect dictValue="administrativePosition" />) },
|
||||
{ name: "todo", label: "专家组职务" },
|
||||
{ name: "todo", label: "家庭住址" },
|
||||
{ name: "todo", label: "籍贯" },
|
||||
{ name: "todo", label: "户口所在地" },
|
||||
{ name: "todo", label: "通讯地址" },
|
||||
{ name: "todo", label: "毕业院校" },
|
||||
{ name: "todo", label: "工作单位" },
|
||||
{ name: "todo", label: "单位主管部门" },
|
||||
{ name: "todo", label: "单位邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的单位邮编" }] },
|
||||
{ name: "todo", label: "排序号", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "专家特长" },
|
||||
{ name: "todo", label: "主要成果" },
|
||||
{ name: "todo", label: "应急工作经历" },
|
||||
{ name: "todo", label: "工作简历概述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_EXPERT], true)(Add);
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_EXPERT } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescueExpertDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescueExpertDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "专家姓名" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "专家姓名", dataIndex: "todo" },
|
||||
{ title: "性别", dataIndex: "todo" },
|
||||
{ title: "专家类型", dataIndex: "todo" },
|
||||
{ title: "办公电话", dataIndex: "todo" },
|
||||
{ title: "移动电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_EXPERT], true)(List);
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_EXPERT } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["expertEmergencyRescueExpertInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.expertEmergencyRescueExpert.expertEmergencyRescueExpertLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "专家姓名", children: info.todo },
|
||||
{ label: "性别", children: info.todo },
|
||||
{ label: "身份证号", children: info.todo },
|
||||
{ label: "出生日期", children: info.todo },
|
||||
{ label: "专家类型", children: info.todo },
|
||||
{ label: "专家密级", children: info.todo },
|
||||
{ label: "职称", children: info.todo },
|
||||
{ label: "专业类型", children: info.todo },
|
||||
{ label: "民族", children: info.todo },
|
||||
{ label: "政治面貌", children: info.todo },
|
||||
{ label: "最高学历", children: info.todo },
|
||||
{ label: "参加工作时间", children: info.todo },
|
||||
{ label: "办公电话", children: info.todo },
|
||||
{ label: "家庭电话", children: info.todo },
|
||||
{ label: "移动电话", children: info.todo },
|
||||
{ label: "传真", children: info.todo },
|
||||
{ label: "电子邮箱", children: info.todo },
|
||||
{ label: "健康状况", children: info.todo },
|
||||
{ label: "行政职务", children: info.todo },
|
||||
{ label: "专家组职务", children: info.todo },
|
||||
{ label: "家庭住址", children: info.todo },
|
||||
{ label: "籍贯", children: info.todo },
|
||||
{ label: "户口所在地", children: info.todo },
|
||||
{ label: "通讯地址", children: info.todo },
|
||||
{ label: "毕业院校", children: info.todo },
|
||||
{ label: "工作单位", children: info.todo },
|
||||
{ label: "单位主管部门", children: info.todo },
|
||||
{ label: "单位邮编", children: info.todo },
|
||||
{ label: "排序号", children: info.todo },
|
||||
{ label: "专家特长", children: info.todo },
|
||||
{ label: "主要成果", children: info.todo },
|
||||
{ label: "应急工作经历", children: info.todo },
|
||||
{ label: "工作简历概述", children: info.todo, span: 2 },
|
||||
{ label: "备注", children: info.todo, span: 2 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_EXPERT], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EmergencyRescueExpert(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EmergencyRescueExpert;
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE, POSTAL_CODE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["expertEmergencyRescueExpertGroupInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "expertEmergencyRescueExpertGroupUpdate" : "expertEmergencyRescueExpertGroupAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.expertEmergencyRescueExpertGroup.expertEmergencyRescueExpertGroupLoading}
|
||||
useAutoGenerateRequired={false}
|
||||
options={[
|
||||
{ name: "todo", label: "专家组名称", rules: [{ required: true, message: "请输入专家组名称" }] },
|
||||
{ name: "todo", label: "专家组类型", render: (<DictionarySelect dictValue="emergencyRescueExpertGroupType" />) },
|
||||
{ name: "todo", label: "专家组级别", render: (<DictionarySelect dictValue="emergencyRescueExpertGroupLevel" />) },
|
||||
{ name: "todo", label: "联系电话", rules: [{ pattern: PHONE, message: "请输入正确的联系电话" }] },
|
||||
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] },
|
||||
{ name: "todo", label: "人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "组建单位" },
|
||||
{ name: "todo", label: "组件单位邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的组件单位邮编" }] },
|
||||
{ name: "todo", label: "组建单位地址", span: 24 },
|
||||
{ name: "todo", label: "负责人" },
|
||||
{ name: "todo", label: "负责人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" }] },
|
||||
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] },
|
||||
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] },
|
||||
{ name: "todo", label: "联系人" },
|
||||
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] },
|
||||
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] },
|
||||
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] },
|
||||
{ name: "todo", label: "联系人电子邮箱", rules: [{ type: "email", message: "请输入正确的联系人电子邮箱" }] },
|
||||
{ name: "todo", label: "排序号", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "专家组介绍", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP], true)(Add);
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertGroupList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescueExpertGroupDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescueExpertGroupDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "专家组名称" },
|
||||
{ name: "todo", label: "专家组类型", render: (<DictionarySelect dictValue="emergencyRescueExpertGroupType" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "专家组名称", dataIndex: "todo" },
|
||||
{ title: "组类型", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./member/list?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
成员管理
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP], true)(List);
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_EXPERT, NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertList"], {
|
||||
form,
|
||||
params: { emergencyRescueExpertGroupId: query.id },
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDelete"]({
|
||||
id: record.id,
|
||||
emergencyRescueExpertGroupId: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDeleteBatch"]({
|
||||
ids: selectedRowKeys,
|
||||
emergencyRescueExpertGroupId: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle="成员管理">
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "专家姓名" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
setAddModalVisible(true);
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "专家姓名", dataIndex: "todo" },
|
||||
{ title: "性别", dataIndex: "todo" },
|
||||
{ title: "专家类型", dataIndex: "todo" },
|
||||
{ title: "办公电话", dataIndex: "todo" },
|
||||
{ title: "移动电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 100,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
{
|
||||
addModalVisible && (
|
||||
<AddModal
|
||||
emergencyRescueExpertGroupId={query.emergencyRescueExpertGroupId}
|
||||
getData={getData}
|
||||
onCancel={() => {
|
||||
setAddModalVisible(false);
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
const AddModalComponent = (props) => {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertList"], {
|
||||
form,
|
||||
useStorageQueryCriteria: false,
|
||||
});
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
return message.warning("请选择要添加的记录");
|
||||
}
|
||||
const { success } = props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertAdd"]({
|
||||
ids: selectedRowKeys,
|
||||
emergencyRescueExpertGroupId: props.emergencyRescueExpertGroupId,
|
||||
});
|
||||
if (success) {
|
||||
message.success("添加成功");
|
||||
props.onClose();
|
||||
props.getData();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open
|
||||
title="新增"
|
||||
maskClosable={false}
|
||||
width={800}
|
||||
onCancel={props.onCancel}
|
||||
onOk={onSubmit}
|
||||
confirmLoading={props.expertEmergencyRescueExpertGroup.expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading}
|
||||
>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "专家姓名" },
|
||||
]}
|
||||
labelCol={{ span: 10 }}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
columns={[
|
||||
{ title: "姓名", dataIndex: "todo" },
|
||||
{ title: "性别", dataIndex: "todo" },
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const AddModal = Connect([NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP, NS_EXPERT_EMERGENCY_RESCUE_EXPERT], true)(AddModalComponent);
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP], true)(List);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Member(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default Member;
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["expertEmergencyRescueExpertGroupInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.expertEmergencyRescueExpertGroup.expertEmergencyRescueExpertGroupLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "专家组名称", children: info.todo },
|
||||
{ label: "专家组类型", children: info.todo },
|
||||
{ label: "专家组级别", children: info.todo },
|
||||
{ label: "联系电话", children: info.todo },
|
||||
{ label: "传真", children: info.todo },
|
||||
{ label: "人数", children: info.todo },
|
||||
{ label: "组建单位", children: info.todo },
|
||||
{ label: "组件单位邮编", children: info.todo },
|
||||
{ label: "组建单位地址", children: info.todo, span: 24 },
|
||||
{ label: "负责人", children: info.todo },
|
||||
{ label: "负责人办公电话", children: info.todo },
|
||||
{ label: "负责人移动电话", children: info.todo },
|
||||
{ label: "负责人住宅电话", children: info.todo },
|
||||
{ label: "联系人", children: info.todo },
|
||||
{ label: "联系人办公电话", children: info.todo },
|
||||
{ label: "联系人移动电话", children: info.todo },
|
||||
{ label: "联系人住宅电话", children: info.todo },
|
||||
{ label: "联系人电子邮箱", children: info.todo },
|
||||
{ label: "排序号", children: info.todo },
|
||||
{ label: "专家组介绍", children: info.todo, span: 24 },
|
||||
{ label: "备注", children: info.todo, span: 24 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_EXPERT_GROUP], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function emergencyRescueExpertGroup(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default emergencyRescueExpertGroup;
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import AreaCascader from "zy-react-library/components/Cascader/Area";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE, POSTAL_CODE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["expertEmergencyRescueTeamInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "expertEmergencyRescueTeamUpdate" : "expertEmergencyRescueTeamAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.expertEmergencyRescueTeam.expertEmergencyRescueTeamLoading}
|
||||
useAutoGenerateRequired={false}
|
||||
options={[
|
||||
{ name: "todo", label: "救援队名称", rules: [{ required: true, message: "请输入救援队名称" }] },
|
||||
{ name: "todo", label: "地址" },
|
||||
{ name: "todo", label: "类型", render: (<DictionarySelect dictValue="emergencyRescueTeamType" />) },
|
||||
{ name: "todo", label: "级别", render: (<DictionarySelect dictValue="emergencyRescueTeamLevel" />) },
|
||||
{ name: "todo", label: "密级", render: (<DictionarySelect dictValue="emergencyRescueTeamSecretLevel" />) },
|
||||
{ name: "todo", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ name: "todo", label: "所属区域", render: (<AreaCascader />), span: 24 },
|
||||
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
|
||||
{ name: "todo", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
|
||||
{
|
||||
name: "todo",
|
||||
label: "负责人办公电话",
|
||||
rules: [
|
||||
{ required: true, message: "请输入负责人办公电话" },
|
||||
{ pattern: TEL_PHONE, message: "请输入正确的电话号码" },
|
||||
],
|
||||
},
|
||||
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ name: "todo", label: "联系人" },
|
||||
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ name: "todo", label: "联系人邮箱", rules: [{ type: "email", message: "请输入正确的邮箱地址" }], span: 24 },
|
||||
{ name: "todo", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
|
||||
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真号码" }] },
|
||||
{ name: "todo", label: "主管单位名称", render: (<DepartmentSelectTree />) },
|
||||
{ name: "todo", label: "主管单位地址" },
|
||||
{ name: "todo", label: "总人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "成立时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo", label: "应急通讯方式", span: 24 },
|
||||
{ name: "todo", label: "主要职责", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
{ name: "todo", label: "主要装备描述", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
{ name: "todo", label: "专长描述", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
{ name: "todo", label: "应急救援经历", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
{
|
||||
name: "todo",
|
||||
label: "资质等级",
|
||||
render: (<DictionarySelect dictValue="emergencyRescueTeamQualificationLevel" />),
|
||||
},
|
||||
{ name: "todo", label: "预计准备时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo", label: "集合出发地点" },
|
||||
{ name: "todo", label: "自备交通工具" },
|
||||
{ name: "todo", label: "需要后备支援", span: 24 },
|
||||
{ name: "todo", label: "备注", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_TEAM], true)(Add);
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["expertEmergencyRescuePersonnelInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "expertEmergencyRescuePersonnelUpdate" : "expertEmergencyRescuePersonnelAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
emergencyRescueTeamId: query.emergencyRescueTeamId,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.expertEmergencyRescueTeam.expertEmergencyRescuePersonnelLoading}
|
||||
options={[
|
||||
{ name: "todo", label: "姓名" },
|
||||
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) },
|
||||
{ name: "todo", label: "年龄", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "手机号", render: FORM_ITEM_RENDER_ENUM.NUMBER, rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] },
|
||||
{ name: "todo", label: "办公电话", render: FORM_ITEM_RENDER_ENUM.NUMBER, rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }] },
|
||||
{ name: "todo", label: "救援队职位名称" },
|
||||
{ name: "todo", label: "所在单位名称" },
|
||||
{ name: "todo", label: "所在单位岗位名称" },
|
||||
{ name: "todo", label: "描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_TEAM], true)(Add);
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["expertEmergencyRescuePersonnelList"], {
|
||||
form,
|
||||
params: { emergencyRescueTeamId: query.id },
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescuePersonnelDelete"]({
|
||||
id: record.id,
|
||||
emergencyRescueTeamId: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescuePersonnelDeleteBatch"]({
|
||||
ids: selectedRowKeys,
|
||||
emergencyRescueTeamId: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle="应急救援人">
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "人员姓名" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push(`./add?emergencyRescueTeamId=${query.id}`);
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "姓名", dataIndex: "todo" },
|
||||
{ title: "性别", dataIndex: "todo" },
|
||||
{ title: "年龄", dataIndex: "todo" },
|
||||
{ title: "手机号", dataIndex: "todo" },
|
||||
{ title: "座机电话号", dataIndex: "todo" },
|
||||
{ title: "救援队职位名称", dataIndex: "todo" },
|
||||
{ title: "所在单位名称", dataIndex: "todo" },
|
||||
{ title: "所在单位岗位名称", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}&emergencyRescueTeamId=${query.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_TEAM], true)(List);
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["expertEmergencyRescuePersonnelInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.expertEmergencyRescueTeam.expertEmergencyRescuePersonnelLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "姓名", children: info.todo },
|
||||
{ label: "性别", children: info.todo },
|
||||
{ label: "年龄", children: info.todo },
|
||||
{ label: "手机号", children: info.todo },
|
||||
{ label: "办公电话", children: info.todo },
|
||||
{ label: "救援队职位名称", children: info.todo },
|
||||
{ label: "所在单位名称", children: info.todo },
|
||||
{ label: "所在单位岗位名称", children: info.todo },
|
||||
{ label: "描述", children: info.todo, span: 2 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_TEAM], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EmergencyRescuePersonnel(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EmergencyRescuePersonnel;
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["expertEmergencyRescueTeamList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescueTeamDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["expertEmergencyRescueTeamDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "队伍名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "队伍名称", dataIndex: "todo" },
|
||||
{ title: "队伍类型", dataIndex: "todo" },
|
||||
{ title: "队伍级别", dataIndex: "todo" },
|
||||
{ title: "队伍地址", dataIndex: "todo" },
|
||||
{ title: "负责人办公电话", dataIndex: "todo" },
|
||||
{ title: "负责人移动电话", dataIndex: "todo" },
|
||||
{ title: "负责人固定电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./emergencyRescuePersonnel/list?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
应急救援人列表
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_TEAM], true)(List);
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_EXPERT_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["expertEmergencyRescueTeamInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.expertEmergencyRescueTeam.expertEmergencyRescueTeamLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "救援队名称", children: info.todo },
|
||||
{ label: "地址", children: info.todo },
|
||||
{ label: "类型", children: info.todo },
|
||||
{ label: "级别", children: info.todo },
|
||||
{ label: "密级", children: info.todo },
|
||||
{ label: "办公电话", children: info.todo },
|
||||
{ label: "所属区域", children: info.todo, span: 2 },
|
||||
{ label: "经度", children: info.todo },
|
||||
{ label: "纬度", children: info.todo },
|
||||
{ label: "负责人", children: info.todo },
|
||||
{ label: "负责人办公电话", children: info.todo },
|
||||
{ label: "负责人移动电话", children: info.todo },
|
||||
{ label: "负责人住宅电话", children: info.todo },
|
||||
{ label: "联系人", children: info.todo },
|
||||
{ label: "联系人办公电话", children: info.todo },
|
||||
{ label: "联系人移动电话", children: info.todo },
|
||||
{ label: "联系人住宅电话", children: info.todo },
|
||||
{ label: "联系人邮箱", children: info.todo, span: 2 },
|
||||
{ label: "邮编", children: info.todo },
|
||||
{ label: "传真", children: info.todo },
|
||||
{ label: "主管单位名称", children: info.todo },
|
||||
{ label: "主管单位地址", children: info.todo },
|
||||
{ label: "总人数", children: info.todo },
|
||||
{ label: "成立时间", children: info.todo },
|
||||
{ label: "应急通讯方式", children: info.todo, span: 2 },
|
||||
{ label: "主要职责", children: info.todo, span: 2 },
|
||||
{ label: "主要装备描述", children: info.todo, span: 2 },
|
||||
{ label: "专长描述", children: info.todo, span: 2 },
|
||||
{ label: "应急救援经历", children: info.todo, span: 2 },
|
||||
{ label: "资质等级", children: info.todo },
|
||||
{ label: "预计准备时间", children: info.todo },
|
||||
{ label: "集合出发地点", children: info.todo },
|
||||
{ label: "自备交通工具", children: info.todo },
|
||||
{ label: "需要后备支援", children: info.todo, span: 2 },
|
||||
{ label: "备注", children: info.todo, span: 2 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EXPERT_EMERGENCY_RESCUE_TEAM], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EmergencyRescueTeam(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EmergencyRescueTeam;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EmergencyExpertTeam(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EmergencyExpertTeam;
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import AreaCascader from "zy-react-library/components/Cascader/Area";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["enterpriseEmergencyOrganizationInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "enterpriseEmergencyOrganizationUpdate" : "enterpriseEmergencyOrganizationAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.enterpriseEmergencyOrganization.enterpriseEmergencyOrganizationLoading}
|
||||
useAutoGenerateRequired={false}
|
||||
options={[
|
||||
{ name: "todo", label: "机构名称", rules: [{ required: true, message: "请输入机构名称" }], span: 24 },
|
||||
{
|
||||
name: "todo",
|
||||
label: "机构类型",
|
||||
render: (<DictionarySelect dictValue="enterpriseEmergencyOrganizationType" />),
|
||||
},
|
||||
{ name: "todo", label: "机构级别", render: (<DictionarySelect dictValue="enterpriseEmergencyOrganizationLevel" />) },
|
||||
{ name: "todo", label: "机构职责", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "值班电话", rules: [{ required: true, message: "请输入值班电话" }, { pattern: TEL_PHONE, message: "请输入正确的值班电话" }] },
|
||||
{ name: "todo", label: "所属区域", render: (<AreaCascader />) },
|
||||
{ name: "todo", label: "所属单位", span: 24 },
|
||||
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENTERPRISE_EMERGENCY_ORGANIZATION], true)(Add);
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["enterpriseEmergencyOrganizationList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["enterpriseEmergencyOrganizationDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["enterpriseEmergencyOrganizationDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "机构名称" },
|
||||
{ name: "todo", label: "机构类型", render: (<DictionarySelect dictValue="enterpriseEmergencyOrganizationType" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "机构名称", dataIndex: "todo" },
|
||||
{ title: "机构类型", dataIndex: "todo" },
|
||||
{ title: "机构级别", dataIndex: "todo" },
|
||||
{ title: "所属区域", dataIndex: "todo" },
|
||||
{ title: "所属单位", dataIndex: "todo" },
|
||||
{ title: "值班电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./personnel/list?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看人员
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENTERPRISE_EMERGENCY_ORGANIZATION], true)(List);
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const { tableProps } = useTable(props["enterpriseEmergencyPersonnelList"], {
|
||||
params: { enterpriseEmergencyOrganizationId: query.id },
|
||||
});
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看人员">
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "姓名", dataIndex: "todo" },
|
||||
{ title: "性别", dataIndex: "todo" },
|
||||
{ title: "行政职务", dataIndex: "todo" },
|
||||
{ title: "行政级别", dataIndex: "todo" },
|
||||
{ title: "身份证号", dataIndex: "todo" },
|
||||
{ title: "联系电话", dataIndex: "todo" },
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENTERPRISE_EMERGENCY_PERSONNEL], true)(List);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Personnel(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default Personnel;
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["enterpriseEmergencyOrganizationInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.enterpriseEmergencyOrganization.enterpriseEmergencyOrganizationLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "机构名称", children: info.todo, span: 2 },
|
||||
{ label: "机构类型", children: info.todo },
|
||||
{ label: "机构级别", children: info.todo },
|
||||
{ label: "机构职责", children: info.todo, span: 2 },
|
||||
{ label: "值班电话", children: info.todo },
|
||||
{ label: "所属区域", children: info.todo },
|
||||
{ label: "所属单位", children: info.todo, span: 2 },
|
||||
{ label: "经度", children: info.todo },
|
||||
{ label: "纬度", children: info.todo },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENTERPRISE_EMERGENCY_ORGANIZATION], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EnterpriseEmergencyOrganization(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EnterpriseEmergencyOrganization;
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||
import { ID_NUMBER, PHONE } from "zy-react-library/regular";
|
||||
import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION, NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const { getUserInfo } = useGetUserInfo();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const [enterpriseEmergencyOrganizationList, setEnterpriseEmergencyOrganizationList] = useState([]);
|
||||
const [userInfo, setUserInfo] = useState({});
|
||||
|
||||
const getEnterpriseEmergencyOrganizationList = async () => {
|
||||
const { data } = await props["enterpriseEmergencyOrganizationListAll"]();
|
||||
setEnterpriseEmergencyOrganizationList(data);
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["enterpriseEmergencyPersonnelInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
getEnterpriseEmergencyOrganizationList();
|
||||
(async () => {
|
||||
const userInfo = await getUserInfo();
|
||||
setUserInfo(userInfo);
|
||||
})();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "enterpriseEmergencyPersonnelUpdate" : "enterpriseEmergencyPersonnelAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.enterpriseEmergencyPersonnel.enterpriseEmergencyPersonnelLoading}
|
||||
options={[
|
||||
{
|
||||
name: "todo",
|
||||
label: "所属机构",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: enterpriseEmergencyOrganizationList,
|
||||
},
|
||||
{
|
||||
name: "todo",
|
||||
label: "用户",
|
||||
render: (
|
||||
<PersonnelSelect
|
||||
params={{ departmentId: userInfo.departmentId }}
|
||||
onGetOption={(option) => {
|
||||
form.setFieldValue("todo", option.sex || "UNKNOWN"); // 设置到性别字段,兜底使用 UNKNOWN
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "todo", label: "排序", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" disabled />) },
|
||||
{ name: "todo", label: "行政职务" },
|
||||
{ name: "todo", label: "行政级别" },
|
||||
{ name: "todo", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] },
|
||||
{ name: "todo", label: "联系电话", rules: [{ pattern: PHONE, message: "请输入正确的联系电话" }] },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENTERPRISE_EMERGENCY_PERSONNEL, NS_ENTERPRISE_EMERGENCY_ORGANIZATION], true)(Add);
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["enterpriseEmergencyPersonnelList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["enterpriseEmergencyPersonnelDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["enterpriseEmergencyPersonnelDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "姓名" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "姓名", dataIndex: "todo" },
|
||||
{ title: "性别", dataIndex: "todo" },
|
||||
{ title: "行政职务", dataIndex: "todo" },
|
||||
{ title: "行政级别", dataIndex: "todo" },
|
||||
{ title: "身份证号", dataIndex: "todo" },
|
||||
{ title: "联系电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENTERPRISE_EMERGENCY_PERSONNEL], true)(List);
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["enterpriseEmergencyPersonnelInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.enterpriseEmergencyPersonnel.enterpriseEmergencyPersonnelLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "所属机构", children: info.todo },
|
||||
{ label: "用户", children: info.todo },
|
||||
{ label: "排序", children: info.todo },
|
||||
{ label: "性别", children: info.todo },
|
||||
{ label: "行政职务", children: info.todo },
|
||||
{ label: "行政级别", children: info.todo },
|
||||
{ label: "身份证号", children: info.todo },
|
||||
{ label: "联系电话", children: info.todo },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENTERPRISE_EMERGENCY_PERSONNEL], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EnterpriseEmergencyPersonnel(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EnterpriseEmergencyPersonnel;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EmergencyManagementOrganization(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EmergencyManagementOrganization;
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["emergencyRescueTeamInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "emergencyRescueTeamUpdate" : "emergencyRescueTeamAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.emergencyRescueTeam.emergencyRescueTeamLoading}
|
||||
options={[
|
||||
{ name: "todo", label: "队伍名称" },
|
||||
{ name: "todo", label: "队伍类别", render: (<DictionarySelect dictValue="emergencyRescueTeamType1" />) },
|
||||
{ name: "todo", label: "队伍属性", render: (<DictionarySelect dictValue="emergencyRescueTeamAttr1" />) },
|
||||
{ name: "todo", label: "队伍级别", render: (<DictionarySelect dictValue="emergencyRescueTeamLevel1" />) },
|
||||
{ name: "todo", label: "队伍等级", render: (<DictionarySelect dictValue="emergencyRescueTeamGrade1" />) },
|
||||
{ name: "todo", label: "成立日期", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo", label: "服务区域" },
|
||||
{ name: "todo", label: "地址" },
|
||||
{ name: "todo", label: "负责人姓名" },
|
||||
{ name: "todo", label: "负责人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ name: "todo", label: "应急值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的应急值班电话" }] },
|
||||
{ name: "todo", label: "总人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "指战人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "车辆数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "后勤人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "救援专业", render: (<DictionarySelect dictValue="rescueProfession" />) },
|
||||
{ name: "todo", label: "队员信息", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "专场描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "队员简介", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EMERGENCY_RESCUE_TEAM], true)(Add);
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["emergencyRescueTeamList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["emergencyRescueTeamDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["emergencyRescueTeamDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "队伍名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "队伍名称", dataIndex: "todo" },
|
||||
{ title: "队伍类别", dataIndex: "todo" },
|
||||
{ title: "队伍属性", dataIndex: "todo" },
|
||||
{ title: "队伍级别", dataIndex: "todo" },
|
||||
{ title: "救援专业", dataIndex: "todo" },
|
||||
{ title: "队伍负责人姓名", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EMERGENCY_RESCUE_TEAM], true)(List);
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_EMERGENCY_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["emergencyRescueTeamInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.emergencyRescueTeam.emergencyRescueTeamLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "队伍名称", children: info.todo },
|
||||
{ label: "队伍类别", children: info.todo },
|
||||
{ label: "队伍属性", children: info.todo },
|
||||
{ label: "队伍级别", children: info.todo },
|
||||
{ label: "队伍等级", children: info.todo },
|
||||
{ label: "成立日期", children: info.todo },
|
||||
{ label: "服务区域", children: info.todo },
|
||||
{ label: "地址", children: info.todo },
|
||||
{ label: "负责人姓名", children: info.todo },
|
||||
{ label: "负责人电话", children: info.todo },
|
||||
{ label: "应急值班电话", children: info.todo },
|
||||
{ label: "总人数", children: info.todo },
|
||||
{ label: "指战人数", children: info.todo },
|
||||
{ label: "车辆数", children: info.todo },
|
||||
{ label: "后勤人数", children: info.todo },
|
||||
{ label: "救援专业", children: info.todo },
|
||||
{ label: "队员信息", children: info.todo, span: 2 },
|
||||
{ label: "专场描述", children: info.todo, span: 2 },
|
||||
{ label: "队员简介", children: info.todo, span: 2 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EMERGENCY_RESCUE_TEAM], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EmergencyRescueTeam(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EmergencyRescueTeam;
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import AreaCascader from "zy-react-library/components/Cascader/Area";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE, POSTAL_CODE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_COMMUNICATION_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["communicationGuaranteeOrganizationInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "communicationGuaranteeOrganizationUpdate" : "communicationGuaranteeOrganizationAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.communicationGuaranteeOrganization.communicationGuaranteeOrganizationLoading}
|
||||
useAutoGenerateRequired={false}
|
||||
options={[
|
||||
{ name: "todo", label: "通讯机构名称", rules: [{ required: true, message: "请输入通讯机构名称" }] },
|
||||
{
|
||||
name: "todo",
|
||||
label: "通讯机构类型",
|
||||
render: (<DictionarySelect dictValue="communicationGuaranteeOrganizationType" />),
|
||||
},
|
||||
{ name: "todo", label: "通讯机构级别" },
|
||||
{ name: "todo", label: "地址" },
|
||||
{ name: "todo", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
|
||||
{ name: "todo", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] },
|
||||
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] },
|
||||
{ name: "todo", label: "所属区域", render: (<AreaCascader />) },
|
||||
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
|
||||
{ name: "todo", label: "应急通讯车数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "应急发电车数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "卫星电话数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "基站总数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "应急通讯方式", span: 24 },
|
||||
{ name: "todo", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
|
||||
{
|
||||
name: "todo",
|
||||
label: "负责人办公电话",
|
||||
rules: [
|
||||
{ required: true, message: "请输入负责人办公电话" },
|
||||
{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" },
|
||||
],
|
||||
},
|
||||
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] },
|
||||
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] },
|
||||
{ name: "todo", label: "联系人" },
|
||||
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] },
|
||||
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] },
|
||||
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] },
|
||||
{ name: "todo", label: "联系人邮箱", rules: [{ type: "email", message: "请输入正确的联系人邮箱" }], span: 24 },
|
||||
{ name: "todo", label: "主管单位", render: (<DepartmentSelectTree />) },
|
||||
{ name: "todo", label: "主管单位地址" },
|
||||
{ name: "todo", label: "企业基本情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "应急能力描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_COMMUNICATION_GUARANTEE_ORGANIZATION], true)(Add);
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_COMMUNICATION_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["communicationGuaranteeOrganizationList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["communicationGuaranteeOrganizationDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["communicationGuaranteeOrganizationDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "机构名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "通讯机构名称", dataIndex: "todo" },
|
||||
{ title: "通讯机构类型", dataIndex: "todo" },
|
||||
{ title: "通讯机构级别", dataIndex: "todo" },
|
||||
{ title: "地址", dataIndex: "todo" },
|
||||
{ title: "值班电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_COMMUNICATION_GUARANTEE_ORGANIZATION], true)(List);
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_COMMUNICATION_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["communicationGuaranteeOrganizationInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.communicationGuaranteeOrganization.communicationGuaranteeOrganizationLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "通讯机构名称", children: info.todo },
|
||||
{ label: "通讯机构类型", children: info.todo },
|
||||
{ label: "通讯机构级别", children: info.todo },
|
||||
{ label: "地址", children: info.todo },
|
||||
{ label: "邮编", children: info.todo },
|
||||
{ label: "值班电话", children: info.todo },
|
||||
{ label: "传真", children: info.todo },
|
||||
{ label: "所属区域", children: info.todo },
|
||||
{ label: "经度", children: info.todo },
|
||||
{ label: "纬度", children: info.todo },
|
||||
{ label: "应急通讯车数", children: info.todo },
|
||||
{ label: "应急发电车数", children: info.todo },
|
||||
{ label: "卫星电话数", children: info.todo },
|
||||
{ label: "基站总数", children: info.todo },
|
||||
{ label: "应急通讯方式", children: info.todo, span: 2 },
|
||||
{ label: "负责人", children: info.todo },
|
||||
{ label: "负责人办公电话", children: info.todo },
|
||||
{ label: "负责人移动电话", children: info.todo },
|
||||
{ label: "负责人住宅电话", children: info.todo },
|
||||
{ label: "联系人", children: info.todo },
|
||||
{ label: "联系人办公电话", children: info.todo },
|
||||
{ label: "联系人移动电话", children: info.todo },
|
||||
{ label: "联系人住宅电话", children: info.todo },
|
||||
{ label: "联系人邮箱", children: info.todo, span: 2 },
|
||||
{ label: "主管单位", children: info.todo },
|
||||
{ label: "主管单位地址", children: info.todo },
|
||||
{ label: "企业基本情况", children: info.todo, span: 2 },
|
||||
{ label: "应急能力描述", children: info.todo, span: 2 },
|
||||
{ label: "备注", children: info.todo, span: 2 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_COMMUNICATION_GUARANTEE_ORGANIZATION], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function CommunicationGuaranteeOrganization(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default CommunicationGuaranteeOrganization;
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import AreaCascader from "zy-react-library/components/Cascader/Area";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE, POSTAL_CODE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_MEDICAL_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["medicalGuaranteeOrganizationInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "medicalGuaranteeOrganizationUpdate" : "medicalGuaranteeOrganizationAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.medicalGuaranteeOrganization.medicalGuaranteeOrganizationLoading}
|
||||
useAutoGenerateRequired={false}
|
||||
options={[
|
||||
{ name: "todo", label: "医疗机构名称", rules: [{ required: true, message: "请输入医疗机构名称" }] },
|
||||
{
|
||||
name: "todo",
|
||||
label: "医疗机构类型",
|
||||
render: (<DictionarySelect dictValue="medicalGuaranteeOrganizationType" />),
|
||||
},
|
||||
{ name: "todo", label: "医疗机构级别" },
|
||||
{ name: "todo", label: "地址" },
|
||||
{ name: "todo", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
|
||||
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] },
|
||||
{ name: "todo", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] },
|
||||
{ name: "todo", label: "所属区域", render: (<AreaCascader />) },
|
||||
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
|
||||
{ name: "todo", label: "病床数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "医生数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "护士数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "急救车辆数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
|
||||
{ name: "todo", label: "应急通讯方式", span: 24 },
|
||||
{ name: "todo", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
|
||||
{
|
||||
name: "todo",
|
||||
label: "负责人办公电话",
|
||||
rules: [
|
||||
{ required: true, message: "请输入负责人办公电话" },
|
||||
{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" },
|
||||
],
|
||||
},
|
||||
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] },
|
||||
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] },
|
||||
{ name: "todo", label: "联系人" },
|
||||
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] },
|
||||
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] },
|
||||
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] },
|
||||
{ name: "todo", label: "主管单位", render: (<DepartmentSelectTree />) },
|
||||
{ name: "todo", label: "主管单位地址" },
|
||||
{ name: "todo", label: "特色", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "主要医疗设备" },
|
||||
{ name: "todo", label: "抗震设防列数" },
|
||||
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_MEDICAL_GUARANTEE_ORGANIZATION], true)(Add);
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_MEDICAL_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["medicalGuaranteeOrganizationList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["medicalGuaranteeOrganizationDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["medicalGuaranteeOrganizationDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "机构名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "医疗机构名称", dataIndex: "todo" },
|
||||
{ title: "医疗结构类型", dataIndex: "todo" },
|
||||
{ title: "医疗机构级别", dataIndex: "todo" },
|
||||
{ title: "地址", dataIndex: "todo" },
|
||||
{ title: "联系人", dataIndex: "todo" },
|
||||
{ title: "联系人固定电话", dataIndex: "todo" },
|
||||
{ title: "联系人移动电话", dataIndex: "todo" },
|
||||
{ title: "修改时间", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_MEDICAL_GUARANTEE_ORGANIZATION], true)(List);
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_MEDICAL_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["medicalGuaranteeOrganizationInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.medicalGuaranteeOrganization.medicalGuaranteeOrganizationLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "医疗机构名称", children: info.todo },
|
||||
{ label: "医疗机构类型", children: info.todo },
|
||||
{ label: "医疗机构级别", children: info.todo },
|
||||
{ label: "地址", children: info.todo },
|
||||
{ label: "邮编", children: info.todo },
|
||||
{ label: "传真", children: info.todo },
|
||||
{ label: "值班电话", children: info.todo },
|
||||
{ label: "所属区域", children: info.todo },
|
||||
{ label: "经度", children: info.todo },
|
||||
{ label: "纬度", children: info.todo },
|
||||
{ label: "病床数", children: info.todo },
|
||||
{ label: "医生数", children: info.todo },
|
||||
{ label: "护士数", children: info.todo },
|
||||
{ label: "急救车辆数", children: info.todo },
|
||||
{ label: "应急通讯方式", children: info.todo, span: 2 },
|
||||
{ label: "负责人", children: info.todo },
|
||||
{ label: "负责人办公电话", children: info.todo },
|
||||
{ label: "负责人移动电话", children: info.todo },
|
||||
{ label: "负责人住宅电话", children: info.todo },
|
||||
{ label: "联系人", children: info.todo },
|
||||
{ label: "联系人办公电话", children: info.todo },
|
||||
{ label: "联系人移动电话", children: info.todo },
|
||||
{ label: "联系人住宅电话", children: info.todo },
|
||||
{ label: "主管单位", children: info.todo },
|
||||
{ label: "主管单位地址", children: info.todo },
|
||||
{ label: "特色", children: info.todo, span: 2 },
|
||||
{ label: "主要医疗设备", children: info.todo },
|
||||
{ label: "抗震设防列数", children: info.todo },
|
||||
{ label: "备注", children: info.todo, span: 2 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_MEDICAL_GUARANTEE_ORGANIZATION], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function MedicalGuaranteeOrganization(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default MedicalGuaranteeOrganization;
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import AreaCascader from "zy-react-library/components/Cascader/Area";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_TECHNICAL_SUPPORT_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["technicalSupportGuaranteeOrganizationInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "technicalSupportGuaranteeOrganizationUpdate" : "technicalSupportGuaranteeOrganizationAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.technicalSupportGuaranteeOrganization.technicalSupportGuaranteeOrganizationLoading}
|
||||
useAutoGenerateRequired={false}
|
||||
options={[
|
||||
{ name: "todo", label: "机构名称", rules: [{ required: true, message: "请输入机构名称" }], span: 24 },
|
||||
{ name: "todo", label: "地址" },
|
||||
{ name: "todo", label: "所属区域", render: (<AreaCascader />) },
|
||||
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
|
||||
{ name: "todo", label: "联系人" },
|
||||
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] },
|
||||
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] },
|
||||
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] },
|
||||
{ name: "todo", label: "运输方式", span: 24 },
|
||||
{ name: "todo", label: "载重", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "所用燃料", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_TECHNICAL_SUPPORT_GUARANTEE_ORGANIZATION], true)(Add);
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_TECHNICAL_SUPPORT_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["technicalSupportGuaranteeOrganizationList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["technicalSupportGuaranteeOrganizationDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["technicalSupportGuaranteeOrganizationDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "机构名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "机构名称", dataIndex: "todo" },
|
||||
{ title: "地址", dataIndex: "todo" },
|
||||
{ title: "联系人", dataIndex: "todo" },
|
||||
{ title: "联系人固定电话", dataIndex: "todo" },
|
||||
{ title: "联系人移动电话", dataIndex: "todo" },
|
||||
{ title: "修改时间", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_TECHNICAL_SUPPORT_GUARANTEE_ORGANIZATION], true)(List);
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_TECHNICAL_SUPPORT_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["technicalSupportGuaranteeOrganizationInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.technicalSupportGuaranteeOrganization.technicalSupportGuaranteeOrganizationLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "机构名称", children: info.todo, span: 2 },
|
||||
{ label: "地址", children: info.todo },
|
||||
{ label: "所属区域", children: info.todo },
|
||||
{ label: "经度", children: info.todo },
|
||||
{ label: "纬度", children: info.todo },
|
||||
{ label: "联系人", children: info.todo },
|
||||
{ label: "联系人办公电话", children: info.todo },
|
||||
{ label: "联系人移动电话", children: info.todo },
|
||||
{ label: "联系人住宅电话", children: info.todo },
|
||||
{ label: "运输方式", children: info.todo, span: 2 },
|
||||
{ label: "载重", children: info.todo, span: 2 },
|
||||
{ label: "所用燃料", children: info.todo, span: 2 },
|
||||
{ label: "备注", children: info.todo, span: 2 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_TECHNICAL_SUPPORT_GUARANTEE_ORGANIZATION], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function TechnicalSupportGuaranteeOrganization(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default TechnicalSupportGuaranteeOrganization;
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import AreaCascader from "zy-react-library/components/Cascader/Area";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE, POSTAL_CODE, TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_TRANSPORT_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["transportGuaranteeOrganizationInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "transportGuaranteeOrganizationUpdate" : "transportGuaranteeOrganizationAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.transportGuaranteeOrganization.transportGuaranteeOrganizationLoading}
|
||||
useAutoGenerateRequired={false}
|
||||
options={[
|
||||
{ name: "todo", label: "运输机构名称", rules: [{ required: true, message: "请输入运输机构名称" }] },
|
||||
{
|
||||
name: "todo",
|
||||
label: "运输机构类型",
|
||||
render: (<DictionarySelect dictValue="transportGuaranteeOrganizationType" />),
|
||||
},
|
||||
{ name: "todo", label: "运输机构级别" },
|
||||
{ name: "todo", label: "地址" },
|
||||
{ name: "todo", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
|
||||
{ name: "todo", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] },
|
||||
{ name: "todo", label: "应急运输方式" },
|
||||
{ name: "todo", label: "所属区域", render: (<AreaCascader />) },
|
||||
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
|
||||
{ name: "todo", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
|
||||
{
|
||||
name: "todo",
|
||||
label: "负责人办公电话",
|
||||
rules: [
|
||||
{ required: true, message: "请输入负责人办公电话" },
|
||||
{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" },
|
||||
],
|
||||
},
|
||||
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] },
|
||||
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] },
|
||||
{ name: "todo", label: "联系人" },
|
||||
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] },
|
||||
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] },
|
||||
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] },
|
||||
{ name: "todo", label: "联系人邮箱", rules: [{ type: "email", message: "请输入正确的联系人邮箱" }], span: 24 },
|
||||
{ name: "todo", label: "主管单位", render: (<DepartmentSelectTree />) },
|
||||
{ name: "todo", label: "主管单位地址" },
|
||||
{ name: "todo", label: "企业基本情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "客运能力" },
|
||||
{ name: "todo", label: "货运能力" },
|
||||
{ name: "todo", label: "应急能力描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_TRANSPORT_GUARANTEE_ORGANIZATION], true)(Add);
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_TRANSPORT_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["transportGuaranteeOrganizationList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["transportGuaranteeOrganizationDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["transportGuaranteeOrganizationDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "机构名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "运输机构名称", dataIndex: "todo" },
|
||||
{ title: "运输机构类型", dataIndex: "todo" },
|
||||
{ title: "运输机构级别", dataIndex: "todo" },
|
||||
{ title: "地址", dataIndex: "todo" },
|
||||
{ title: "值班电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_TRANSPORT_GUARANTEE_ORGANIZATION], true)(List);
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_TRANSPORT_GUARANTEE_ORGANIZATION } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["transportGuaranteeOrganizationInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.transportGuaranteeOrganization.transportGuaranteeOrganizationLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "运输机构名称", children: info.todo },
|
||||
{ label: "运输机构类型", children: info.todo },
|
||||
{ label: "运输机构级别", children: info.todo },
|
||||
{ label: "地址", children: info.todo },
|
||||
{ label: "邮编", children: info.todo },
|
||||
{ label: "值班电话", children: info.todo },
|
||||
{ label: "应急运输方式", children: info.todo },
|
||||
{ label: "所属区域", children: info.todo },
|
||||
{ label: "经度", children: info.todo },
|
||||
{ label: "纬度", children: info.todo },
|
||||
{ label: "负责人", children: info.todo },
|
||||
{ label: "负责人办公电话", children: info.todo },
|
||||
{ label: "负责人移动电话", children: info.todo },
|
||||
{ label: "负责人住宅电话", children: info.todo },
|
||||
{ label: "联系人", children: info.todo },
|
||||
{ label: "联系人办公电话", children: info.todo },
|
||||
{ label: "联系人移动电话", children: info.todo },
|
||||
{ label: "联系人住宅电话", children: info.todo },
|
||||
{ label: "联系人邮箱", children: info.todo, span: 2 },
|
||||
{ label: "主管单位", children: info.todo },
|
||||
{ label: "主管单位地址", children: info.todo },
|
||||
{ label: "企业基本情况", children: info.todo, span: 2 },
|
||||
{ label: "客运能力", children: info.todo },
|
||||
{ label: "货运能力", children: info.todo },
|
||||
{ label: "应急能力描述", children: info.todo, span: 2 },
|
||||
{ label: "备注", children: info.todo, span: 2 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_TRANSPORT_GUARANTEE_ORGANIZATION], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function TransportGuaranteeOrganization(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default TransportGuaranteeOrganization;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function ProfessionalGuaranteeOrganization(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default ProfessionalGuaranteeOrganization;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function EmergencyOrganization(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default EmergencyOrganization;
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE } from "zy-react-library/regular";
|
||||
import { NS_CLOSED_CARD_PORT } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["closedCardPortInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "closedCardPortUpdate" : "closedCardPortAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.closedCardPort.closedCardPortLoading}
|
||||
options={[
|
||||
{ name: "todo", label: "卡口名称" },
|
||||
{ name: "todo", label: "详情地址" },
|
||||
{ name: "todo", label: "联系人" },
|
||||
{ name: "todo", label: "联系人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ key: "map", customizeRender: true, span: 24, render: (<Map />) },
|
||||
{ name: "todo", label: "描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_CLOSED_CARD_PORT], true)(Add);
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_CLOSED_CARD_PORT } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["closedCardPortList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["closedCardPortDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["closedCardPortDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "卡口名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "卡口名称", dataIndex: "todo" },
|
||||
{ title: "地址", dataIndex: "todo" },
|
||||
{ title: "联系人", dataIndex: "todo" },
|
||||
{ title: "联系电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_CLOSED_CARD_PORT], true)(List);
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_CLOSED_CARD_PORT } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["closedCardPortInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.closedCardPort.closedCardPortLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "卡口名称", children: info.todo },
|
||||
{ label: "详情地址", children: info.todo },
|
||||
{ label: "联系人", children: info.todo },
|
||||
{ label: "联系人电话", children: info.todo },
|
||||
{ label: "经度", children: info.todo },
|
||||
{ label: "纬度", children: info.todo },
|
||||
{ label: "描述", children: info.todo },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_CLOSED_CARD_PORT], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function ClosedCardPort(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default ClosedCardPort;
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { TEL_PHONE } from "zy-react-library/regular";
|
||||
import { NS_DRAINAGE_WELL } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["drainageWellInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "drainageWellUpdate" : "drainageWellAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.drainageWell.drainageWellLoading}
|
||||
options={[
|
||||
{ name: "todo", label: "排水井名称" },
|
||||
{ name: "todo", label: "类型", render: (<DictionarySelect dictValue="drainageWellType" />) },
|
||||
{ name: "todo", label: "详情地址", required: false, span: 24 },
|
||||
{ name: "todo", label: "联系人", required: false },
|
||||
{ name: "todo", label: "联系人固定电话", required: false, rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
|
||||
{ key: "map", customizeRender: true, span: 24, render: (<Map />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_DRAINAGE_WELL], true)(Add);
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_DRAINAGE_WELL } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["drainageWellList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: `确定要删除【${record.todo}】吗`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["drainageWellDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onDeleteBatch = () => {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择要删除的记录");
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["drainageWellDeleteBatch"]({ ids: selectedRowKeys });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo", label: "排水井名称" },
|
||||
{ name: "todo", label: "类型", render: (<DictionarySelect dictValue="drainageWellType" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={(<AddIcon />)}
|
||||
onClick={() => {
|
||||
props.history.push("./add");
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
ghost
|
||||
icon={(<DeleteIcon />)}
|
||||
onClick={onDeleteBatch}
|
||||
>
|
||||
批量删除
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "排水井名称", dataIndex: "todo" },
|
||||
{ title: "类型", dataIndex: "todo" },
|
||||
{ title: "所在地址", dataIndex: "todo" },
|
||||
{ title: "联系人", dataIndex: "todo" },
|
||||
{ title: "联系人电话", dataIndex: "todo" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
onDelete(record);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_DRAINAGE_WELL], true)(List);
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_DRAINAGE_WELL } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["drainageWellInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.drainageWell.drainageWellLoading}>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "排水井名称", children: info.todo },
|
||||
{ label: "类型", children: info.todo },
|
||||
{ label: "详情地址", children: info.todo, span: 2 },
|
||||
{ label: "经度", children: info.todo },
|
||||
{ label: "纬度", children: info.todo },
|
||||
{ label: "联系人", children: info.todo },
|
||||
{ label: "联系人固定电话", children: info.todo },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_DRAINAGE_WELL], true)(View);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function DrainageWell(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default DrainageWell;
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { PHONE } from "zy-react-library/regular";
|
||||
import { NS_EMERGENCY_EQUIPMENT } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (!query.id)
|
||||
return;
|
||||
|
||||
const { data } = await props["emergencyEquipmentInfo"]({ id: query.id });
|
||||
form.setFieldsValue(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[query.id ? "emergencyEquipmentUpdate" : "emergencyEquipmentAdd"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success(query.id ? "编辑成功" : "新增成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
loading={props.emergencyEquipment.emergencyEquipmentLoading}
|
||||
options={[
|
||||
{ name: "todo", label: "装备名称" },
|
||||
{ name: "todo", label: "装备类别", render: (<DictionarySelect dictValue="emergencyEquipmentCategory" />) },
|
||||
{ name: "todo", label: "规格型号" },
|
||||
{ name: "todo", label: "技术性能指标" },
|
||||
{ name: "todo", label: "保养周期" },
|
||||
{ name: "todo", label: "有效期", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo", label: "用途说明", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{ name: "todo", label: "存放场所", span: 24 },
|
||||
{ name: "todo", label: "负责保管人姓名" },
|
||||
{ name: "todo", label: "负责保管人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_EMERGENCY_EQUIPMENT], true)(Add);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue