@ -1,10 +0,0 @@ |
|||
# port |
|||
VITE_PORT = 3333 |
|||
#mode |
|||
VITE_GLOB_APP_RUN_TYPE = saas |
|||
|
|||
# spa-title |
|||
VITE_GLOB_APP_TITLE = Smart Community-op |
|||
|
|||
# spa shortname |
|||
VITE_GLOB_APP_SHORT_NAME = smart-community-op |
@ -1,22 +0,0 @@ |
|||
# Whether to open mock |
|||
VITE_USE_MOCK = true |
|||
|
|||
# public path |
|||
VITE_PUBLIC_PATH = / |
|||
|
|||
# Cross-domain proxy, you can configure multiple |
|||
# Please note that no line breaks |
|||
VITE_PROXY = {"/api":{ "target":"http://100.73.70.51","changeOrigin": true}} |
|||
# VITE_PROXY=[["/api","https://vvbin.cn/test"]] |
|||
|
|||
# Delete console |
|||
VITE_DROP_CONSOLE = false |
|||
|
|||
# Basic interface address SPA |
|||
VITE_GLOB_API_URL=/basic-api |
|||
|
|||
# File upload address, optional |
|||
VITE_GLOB_UPLOAD_URL=/upload |
|||
|
|||
# Interface prefix |
|||
VITE_GLOB_API_URL_PREFIX= |
@ -1,35 +0,0 @@ |
|||
# Whether to open mock |
|||
VITE_USE_MOCK = true |
|||
|
|||
# public path |
|||
VITE_PUBLIC_PATH = / |
|||
|
|||
# Delete console |
|||
VITE_DROP_CONSOLE = true |
|||
|
|||
# Whether to enable gzip or brotli compression |
|||
# Optional: gzip | brotli | none |
|||
# If you need multiple forms, you can use `,` to separate |
|||
VITE_BUILD_COMPRESS = 'none' |
|||
|
|||
# Whether to delete origin files when using compress, default false |
|||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false |
|||
|
|||
# Basic interface address SPA |
|||
VITE_GLOB_API_URL=/basic-api |
|||
|
|||
# File upload address, optional |
|||
# It can be forwarded by nginx or write the actual address directly |
|||
VITE_GLOB_UPLOAD_URL=/upload |
|||
|
|||
# Interface prefix |
|||
VITE_GLOB_API_URL_PREFIX= |
|||
|
|||
# Whether to enable image compression |
|||
VITE_USE_IMAGEMIN= true |
|||
|
|||
# use pwa |
|||
VITE_USE_PWA = false |
|||
|
|||
# Is it compatible with older browsers |
|||
VITE_LEGACY = false |
@ -1 +0,0 @@ |
|||
1.0.14 |
@ -1,74 +0,0 @@ |
|||
#!/bin/bash |
|||
SOURCE="$0" |
|||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink |
|||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|||
SOURCE="$(readlink "$SOURCE")" |
|||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located |
|||
done |
|||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|||
|
|||
if [ -z $WORKSPACE ];then |
|||
echo "WORKSPACE not exists" |
|||
else |
|||
set DIR=$WORKSPACE |
|||
fi |
|||
|
|||
echo "current dir" |
|||
echo "$DIR" |
|||
|
|||
cd "$DIR" |
|||
projectname=$(basename `pwd`) |
|||
|
|||
npm run community-op-build |
|||
|
|||
if [ -d "$DIR/dist" ];then |
|||
|
|||
cd "$DIR/dist" |
|||
|
|||
# copy module.json |
|||
cp ../module.json ./ |
|||
|
|||
# package |
|||
VERSION=$(cat ../.version) |
|||
lastdir=../release/ |
|||
if [ -d ${lastdir} ];then |
|||
echo "删除旧release文件夹" |
|||
rm -rf ${lastdir} |
|||
else |
|||
echo "文件夹不存在!" |
|||
fi |
|||
mkdir -p ${lastdir} |
|||
|
|||
dir=../release/nerv/$projectname/$VERSION |
|||
mkdir -p ${dir} |
|||
tar -zcvf "${dir}/$projectname-$VERSION.tgz" ./* |
|||
|
|||
templatedir=../release/resources/templates/nerv/$projectname/$VERSION/$projectname |
|||
mkdir -p ${templatedir} |
|||
cp -r ../resources/templates/* ${templatedir} |
|||
|
|||
cd ../ |
|||
|
|||
releasefile=nerv-$projectname-$VERSION.tgz |
|||
if [ -f ${releasefile} ];then |
|||
echo "删除旧包!" |
|||
rm -rf ${releasefile} |
|||
fi |
|||
|
|||
tar -zcvf ${releasefile} ./release/* release.yaml |
|||
|
|||
mkdir -p ./release/nervui |
|||
cp -r ./release/nerv/* ./release/nervui |
|||
|
|||
if [ -f ${releasefile} ];then |
|||
echo "编译成功!" |
|||
mv ${releasefile} ./release |
|||
else |
|||
echo "编译失败!!!" |
|||
exit 1 |
|||
fi |
|||
|
|||
else |
|||
echo "编译失败!!!" |
|||
exit 1 |
|||
fi |
@ -1,18 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="UTF-8" /> |
|||
<link rel="icon" href="/favicon.ico" /> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|||
<title>smart-community-op</title> |
|||
<script type="text/javascript"> |
|||
window._AMapSecurityConfig = { |
|||
securityJsCode: '09e43004c09d39c0e61f8fd65d5e6a5a', |
|||
}; |
|||
</script> |
|||
</head> |
|||
<body> |
|||
<div id="app"></div> |
|||
<script type="module" src="./src/main.ts"></script> |
|||
</body> |
|||
</html> |
Before Width: | Height: | Size: 602 B |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1008 KiB |
Before Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.2 KiB |
@ -1,12 +0,0 @@ |
|||
# 上传release目录信息到nerv-file仓库 |
|||
release: |
|||
- {src: release, dest: /upload/pkg, include: [".*(.tgz)$"]} |
|||
- {src: release/resources/templates, dest: /upload/templates} |
|||
register: |
|||
name: nervui-smart-community-op |
|||
version: 1.0.14 |
|||
components: |
|||
- type: nervui-smart-community-op |
|||
resources: |
|||
- {type: template, relativePath: /nervui-smart-community-op/deploy.json} |
|||
|
@ -1,35 +0,0 @@ |
|||
echo "=====================================================create=====================================================" |
|||
|
|||
#!/usr/bin/env bash |
|||
|
|||
function create() { |
|||
|
|||
if [ -d "$nervui_app_home" ];then |
|||
echo "$nervui_app_home exists!" |
|||
else |
|||
echo "start mkdir $nervui_app_home" |
|||
mkdir -p "$nervui_app_home" |
|||
fi |
|||
|
|||
pkg_file_name=${pkg_url##*/} |
|||
pkg_file_path="$nervui_app_home$pkg_file_name" |
|||
|
|||
|
|||
echo "start download $pkg_url" |
|||
curl -L -o $pkg_file_path $pkg_url |
|||
|
|||
|
|||
echo "start install $pkg_file_path" |
|||
tar -xf $pkg_file_path -C $nervui_app_home |
|||
|
|||
} |
|||
|
|||
if [ "$pkg_url" == "" ]; then |
|||
echo {\"error\":\"pkg_url is empty\"} |
|||
exit 1 |
|||
elif [ "$nervui_app_home" == "" ]; then |
|||
echo {\"error\":\"nervui_app_home is empty\"} |
|||
exit 1 |
|||
else |
|||
create |
|||
fi |
@ -1 +0,0 @@ |
|||
echo "=====================================================delete=====================================================" |
@ -1 +0,0 @@ |
|||
echo "=====================================================setup=====================================================" |
@ -1 +0,0 @@ |
|||
echo "=====================================================start=====================================================" |
@ -1 +0,0 @@ |
|||
echo "=====================================================stop=====================================================" |
@ -1,30 +0,0 @@ |
|||
{ |
|||
"name": "/nervui/nervui-smart-community-op", |
|||
"operations": [ |
|||
{ |
|||
"name": "Create", |
|||
"type": "shell", |
|||
"implementor": "create.sh" |
|||
}, |
|||
{ |
|||
"name": "Delete", |
|||
"type": "shell", |
|||
"implementor": "delete.sh" |
|||
}, |
|||
{ |
|||
"name": "Setup", |
|||
"type": "shell", |
|||
"implementor": "setup.sh" |
|||
}, |
|||
{ |
|||
"name": "Start", |
|||
"type": "shell", |
|||
"implementor": "start.sh" |
|||
}, |
|||
{ |
|||
"name": "Stop", |
|||
"type": "shell", |
|||
"implementor": "stop.sh" |
|||
} |
|||
] |
|||
} |
@ -1,64 +0,0 @@ |
|||
{ |
|||
"name": "/nervui/nervui-smart-community-op", |
|||
"version": 1, |
|||
"inputs": [ |
|||
{ |
|||
"name": "server_ip", |
|||
"type": "string", |
|||
"required": true, |
|||
"description": "应用安装IP地址", |
|||
"inputType": "ipSelectType" |
|||
}, |
|||
{ |
|||
"name": "version", |
|||
"type": "string", |
|||
"required": true, |
|||
"description": "软件版本", |
|||
"inputType": "versionSelectType" |
|||
}, |
|||
{ |
|||
"name": "install_dir", |
|||
"type": "string", |
|||
"required": true, |
|||
"defaultValue": "/data", |
|||
"inputType": "textInputType", |
|||
"description": "安装目录" |
|||
} |
|||
], |
|||
"nodes": [ |
|||
{ |
|||
"name": "nervui-smart-community-op", |
|||
"type": "/nerv/nerv-orchestrator/cluster/Nervui", |
|||
"parameters": [ |
|||
{ |
|||
"name": "file_repository", |
|||
"value": "${nerv_file_repository}" |
|||
}, |
|||
{ |
|||
"name": "install_dir", |
|||
"value": "${install_dir}" |
|||
}, |
|||
{ |
|||
"name": "pkg_url", |
|||
"value": "/api/pkg/nerv/nervui-smart-community-op/${version}/nervui-smart-community-op-${version}.tgz" |
|||
} |
|||
], |
|||
"dependencies": [ |
|||
{ |
|||
"type": "contained", |
|||
"target": "host" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"name": "host", |
|||
"type": "/nerv/nerv-orchestrator/compute/Host", |
|||
"parameters": [ |
|||
{ |
|||
"name": "address", |
|||
"value": "${server_ip}" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
@ -1,336 +0,0 @@ |
|||
<!-- @format --> |
|||
|
|||
<template> |
|||
<a-config-provider :locale="locale"> |
|||
<router-view /> |
|||
</a-config-provider> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
import { defineComponent, watch, ref } from 'vue'; |
|||
import zhCN from 'ant-design-vue/es/locale/zh_CN'; |
|||
import { useRouter } from 'vue-router'; |
|||
import Cookies from 'js-cookie'; |
|||
import { message } from 'ant-design-vue'; |
|||
export default defineComponent({ |
|||
name: 'App', |
|||
|
|||
setup() { |
|||
const router = useRouter(); |
|||
router.beforeEach((to, from) => { |
|||
if (Cookies.get('nervsid') === undefined && to.fullPath !== '/login') { |
|||
if (from.name !== undefined) { |
|||
message.warn('登陆信息已过期,请重新登录!', 1); |
|||
} |
|||
router.push('/login'); |
|||
} |
|||
}); |
|||
|
|||
const cachedViews = ['Status']; |
|||
|
|||
// watch( |
|||
// () => router.currentRoute.value, |
|||
// (e) => { |
|||
// // if (Cookies.get('nervsid') === undefined && e.fullPath !== '/login') { |
|||
// // message.warn('登陆信息已过期,请重新登录!', 1); |
|||
// // router.push('/login'); |
|||
// // } |
|||
// // } else { |
|||
// // if (Cookies.get('nervsid') !== undefined && e === '/login') { |
|||
// // let url = window.sessionStorage.getItem('url'); |
|||
// // url === null ? window.sessionStorage.setItem('url', '/doorway/visitor/audit') : ''; |
|||
// // router.push(url === null ? '/doorway' : url); |
|||
// // } |
|||
// // } |
|||
// } |
|||
// ); |
|||
return { |
|||
cachedViews, |
|||
locale: zhCN, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
|||
|
|||
<style lang="less" scoped> |
|||
#app { |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
:deep(.nsHeader_action) { |
|||
.action { |
|||
cursor: pointer; |
|||
&:hover { |
|||
background-color: @primary-color; |
|||
} |
|||
} |
|||
} |
|||
|
|||
/***顶部菜单和侧边菜单样式修改 */ |
|||
:deep(.ns-left-menu) { |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
z-index: 99; |
|||
height: calc(100% - 40px); |
|||
background-image: url(/asset/image/side.png); |
|||
background-size: cover; |
|||
padding-top: 48px; |
|||
.ant-layout-sider-children { |
|||
background-color: transparent; |
|||
.ant-menu-root { |
|||
background-color: transparent; |
|||
} |
|||
.ant-menu { |
|||
color: rgba(255, 255, 255, 0.9); |
|||
} |
|||
.ant-menu-item a { |
|||
color: rgba(255, 255, 255, 0.9); |
|||
} |
|||
.ant-menu-submenu-expand-icon, |
|||
.ant-menu-submenu-arrow { |
|||
color: rgba(255, 255, 255, 0.9); |
|||
} |
|||
.ant-menu-sub.ant-menu-inline { |
|||
background-color: #001027; |
|||
} |
|||
} |
|||
} |
|||
:deep(.ns-header-menu) { |
|||
background-size: 100% 100%; |
|||
.ant-menu-root { |
|||
background-color: transparent; |
|||
} |
|||
.ant-menu.ant-menu-dark .ant-menu-item:hover { |
|||
background: @primary-color !important; |
|||
} |
|||
.ant-menu.ant-menu-dark .ant-menu-item-selected { |
|||
background: @primary-color !important; |
|||
} |
|||
} |
|||
:deep(.ns-left-menu-trigger) { |
|||
background: rgba(0, 0, 0, 0.1) !important; |
|||
} |
|||
:deep(.ant-menu-inline .ant-menu-item-selected) { |
|||
&::after { |
|||
position: absolute; |
|||
border: unset !important; |
|||
content: ''; |
|||
} |
|||
&::before { |
|||
background: transparent; |
|||
} |
|||
} |
|||
/********* 菜单选中符号修改 */ |
|||
:deep(.ant-menu-sub .ant-menu-item-selected::after) { |
|||
position: absolute; |
|||
width: 2px; |
|||
height: 14px; |
|||
background: #fff; |
|||
border: unset; |
|||
top: 14px; |
|||
left: 20px; |
|||
right: 0; |
|||
bottom: 0; |
|||
content: ''; |
|||
} |
|||
:deep(.ant-menu-submenu .ant-menu-submenu .ant-menu-sub .ant-menu-item-selected::after) { |
|||
position: absolute; |
|||
width: 2px; |
|||
height: 14px; |
|||
background: #fff; |
|||
border: unset; |
|||
top: 14px; |
|||
left: 40px; |
|||
right: 0; |
|||
bottom: 0; |
|||
content: ''; |
|||
} |
|||
/********* 一级菜单选中效果 */ |
|||
:deep(.firstMenuItem-selected) { |
|||
background: @primary-color!important; |
|||
border-radius: 4px; |
|||
} |
|||
:deep(.ns-left-menu .ant-layout-sider-children .ant-menu-submenu-arrow) { |
|||
color: rgba(255, 255, 255, 0.5); |
|||
} |
|||
:deep(.ant-layout-sider-children) { |
|||
overflow-x: hidden; |
|||
} |
|||
:deep(.ns-left-menu .firstMenuItem-selected .ant-menu-title-content) { |
|||
background: unset !important; |
|||
} |
|||
:deep(.ns-left-menu .ant-menu-item-selected .ant-menu-title-content) { |
|||
color: #fff !important; |
|||
background: @primary-color; |
|||
border-radius: 2px; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
a { |
|||
color: #ffffff !important; |
|||
} |
|||
} |
|||
:deep(.ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover) { |
|||
background: @primary-color; |
|||
} |
|||
:deep(.ant-menu-inline .ant-menu-submenu-title) { |
|||
color: rgba(255, 255, 255, 0.9) !important; |
|||
} |
|||
:deep(.ns-left-menu .ant-layout-sider-children .ant-menu-sub.ant-menu-inline) { |
|||
position: relative; |
|||
&::before { |
|||
display: flex; |
|||
width: 2px; |
|||
height: calc(100% - 40px); |
|||
position: absolute; |
|||
top: 20px; |
|||
left: 20px; |
|||
content: ''; |
|||
background-color: rgba(255, 255, 255, 0.2); |
|||
} |
|||
} |
|||
:deep(.link-btn) { |
|||
color: @primary-color !important; |
|||
} |
|||
:deep(.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected) { |
|||
color: @primary-color !important; |
|||
} |
|||
:deep(.ant-table-footer .ns-icon) { |
|||
color: @primary-color !important; |
|||
} |
|||
//*************************含tab的 list列表样式 */ |
|||
:deep(.tabListTable) { |
|||
.ns-table-title { |
|||
text-align: left; |
|||
height: 46px; |
|||
line-height: 46px; |
|||
font-size: 18px; |
|||
font-weight: bold; |
|||
user-select: text; |
|||
padding-left: 16px; |
|||
background: #fff; |
|||
width: calc(100% + 32px); |
|||
margin-left: -16px; |
|||
} |
|||
.tabs-list { |
|||
overflow: visible !important; |
|||
} |
|||
.ant-tabs-nav { |
|||
width: calc(100% + 32px); |
|||
margin-left: -16px !important; |
|||
background: #fff; |
|||
border-top: 1px solid #e5ebf0; |
|||
} |
|||
.ant-tabs-nav-list { |
|||
margin-left: 0px; |
|||
} |
|||
.ant-tabs-nav-wrap { |
|||
padding: 0 16px; |
|||
height: 46px; |
|||
} |
|||
.customContent { |
|||
border-top: 16px solid #e5ebf0; |
|||
} |
|||
} |
|||
|
|||
//*********************详情页返回修改 */ |
|||
:deep(.nsDetailView) { |
|||
min-height: 100%; |
|||
height: 100%; |
|||
.ns-detail-content { |
|||
padding: 0px 24px; |
|||
border-top: 16px solid #e5ebf0; |
|||
} |
|||
|
|||
.ant-descriptions-item-label { |
|||
color: rgba(0, 0, 0, 0.5); |
|||
font-family: PingFang SC; |
|||
font-size: 14px; |
|||
} |
|||
.ant-descriptions-item-content { |
|||
color: rgba(0, 0, 0, 0.95); |
|||
font-family: PingFang SC; |
|||
font-size: 14px; |
|||
} |
|||
.ns-table .ns-table-main { |
|||
border: unset; |
|||
} |
|||
.ant-descriptions-title { |
|||
&::after { |
|||
content: ''; |
|||
width: 75px; |
|||
height: 7px; |
|||
display: block; |
|||
background: linear-gradient(90deg, @primary-color 0%, #fff 82.67%); |
|||
margin-left: 2px; |
|||
margin-top: -2px; |
|||
} |
|||
} |
|||
|
|||
.ant-descriptions-row > th, |
|||
.ant-descriptions-row > td { |
|||
padding-bottom: 8px; |
|||
} |
|||
.ns-page-header { |
|||
margin-bottom: 0 !important; |
|||
padding-top: 7px !important; |
|||
padding-bottom: 7px !important; |
|||
width: calc(100% + 32px); |
|||
margin-left: -16px; |
|||
.title { |
|||
cursor: pointer; |
|||
font-size: 18px !important; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
} |
|||
.ant-descriptions-header { |
|||
margin: 16px 0 16px 0 !important; |
|||
|
|||
.ant-descriptions-title { |
|||
line-height: 16px; |
|||
font-size: 16px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
<style lang="less"> |
|||
// 列表弹框样式修改 |
|||
.listTableModal .ant-modal-title { |
|||
font-weight: 600; |
|||
} |
|||
.listTableModal .ant-modal-body { |
|||
padding: 16px !important; |
|||
.ant-tabs-nav-wrap { |
|||
padding: 0px; |
|||
} |
|||
.ns-list-table { |
|||
border-left: 16px solid #e5ebf0; |
|||
border-right: 16px solid #e5ebf0; |
|||
border-bottom: 16px solid #e5ebf0; |
|||
} |
|||
} |
|||
:deep(.ant-menu-submenu-title) { |
|||
color: #ffffff !important; |
|||
} |
|||
//************************修改顶部菜单弹框样式 |
|||
.ant-menu-submenu-placement-bottomLeft { |
|||
.ant-menu-submenu { |
|||
background: rgb(3 24 53) !important; |
|||
} |
|||
|
|||
.ant-menu-sub { |
|||
background: rgb(3 24 53) !important; |
|||
} |
|||
.ant-menu-title-content { |
|||
color: #fff !important; |
|||
.ns-icon { |
|||
margin-right: 7px; |
|||
transform: translateY(2px); |
|||
} |
|||
} |
|||
.ant-menu-submenu-arrow { |
|||
color: #fff !important; |
|||
} |
|||
} |
|||
</style> |
@ -1,49 +0,0 @@ |
|||
/*** |
|||
*配置接口 格式 module:Array<resource> |
|||
*/ |
|||
export const apiModule = { |
|||
community: [ |
|||
'User', |
|||
'CurrentUser', |
|||
'Organizational', |
|||
'Device', |
|||
'Region', |
|||
'Owner', |
|||
'AllList', |
|||
'VisitorRecord', |
|||
'Room', |
|||
'Device', |
|||
'CommunityVisitor', |
|||
'AccessControlGroup', |
|||
'AccessControlLeft', |
|||
'AccessControlRight', |
|||
'AccessControlRightIdentity', |
|||
'Visitor', |
|||
'DeviceListByDeviceCategory', |
|||
'Perimeter', |
|||
'AccessControlRightVisitorIdentity', |
|||
'BedChoose', |
|||
'Gateway', |
|||
'FileUpload', |
|||
'User', |
|||
'CurrentUser', |
|||
'Organizational', |
|||
'Device', |
|||
'Region', |
|||
'Owner', |
|||
'AllList', |
|||
'VisitorRecord', |
|||
'Room', |
|||
'Device', |
|||
'CommunityVisitor', |
|||
'AccessControlGroup', |
|||
'AccessControlLeft', |
|||
'AccessControlRight', |
|||
'AccessControlRightIdentity', |
|||
'Visitor', |
|||
'DeviceListByDeviceCategory', |
|||
'BedChoose', |
|||
'Perimeter', |
|||
'OrganizationConfig', |
|||
], |
|||
}; |
@ -1,15 +0,0 @@ |
|||
import { http } from '/nerv-lib/util/http'; |
|||
|
|||
enum Api { |
|||
USER_LOGIN = '/api/community/objs/Login', //用户登录
|
|||
USER_INFO = 'api/community/community/objs/CurrentUser', //获取用户信息
|
|||
} |
|||
export const userLogin = (data: RoomListModel) => http.post(Api.USER_LOGIN, data); |
|||
export const userInfo = () => http.get(Api.USER_INFO); |
|||
/** |
|||
* @description 用户登录 |
|||
* @property `[fatherRegionUuid]` 父级区域唯一标识 |
|||
*/ |
|||
interface RoomListModel { |
|||
data: string; |
|||
} |
@ -1,10 +0,0 @@ |
|||
import { http } from '/nerv-lib/util/http'; |
|||
|
|||
/** |
|||
* 获取审批数据 |
|||
* @param {*} data |
|||
* @returns |
|||
*/ |
|||
export function getWorkFlowData(data) { |
|||
return http.get('/api/workflow/objs/admin/processTemplate/detail', data); |
|||
} |
@ -1,179 +0,0 @@ |
|||
<template> |
|||
<div class="add-node-btn-box"> |
|||
<div class="add-node-btn"> |
|||
<Popover placement="right"> |
|||
<template #content> |
|||
<div class="add-node-popover-body"> |
|||
<a class="add-node-popover-item approver" @click="addType(2)"> |
|||
<p>新增审批</p> |
|||
</a> |
|||
<!-- <a class="add-node-popover-item condition" @click="addType(3)"> |
|||
<p>新增条件分支</p> |
|||
</a> --> |
|||
</div> |
|||
</template> |
|||
<button class="btn" type="button"> |
|||
<span class="iconfont"></span> |
|||
</button> |
|||
</Popover> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script setup> |
|||
import { ref } from 'vue'; |
|||
import { Popover } from 'ant-design-vue'; |
|||
let props = defineProps({ |
|||
childNodeP: { |
|||
type: Object, |
|||
default: () => ({}), |
|||
}, |
|||
}); |
|||
let emits = defineEmits(['update:childNodeP']); |
|||
let visible = ref(false); |
|||
const addType = (type) => { |
|||
console.log(props.childNodeP); |
|||
visible.value = false; |
|||
if (type != 3) { |
|||
var data; |
|||
if (type == 2) { |
|||
data = { |
|||
name: '审批', |
|||
nodeType: 2, |
|||
next: JSON.stringify(props.childNodeP) == '{}' ? null : props.childNodeP, |
|||
sendMessage: 1, |
|||
assignee: {}, |
|||
exclusive: [], |
|||
}; |
|||
} |
|||
emits('update:childNodeP', data); |
|||
} else { |
|||
emits('update:childNodeP', { |
|||
name: '路由', |
|||
nodeType: 3, |
|||
exclusive: [ |
|||
{ |
|||
name: '条件1', |
|||
jumpId: '', |
|||
conditionType: 2, |
|||
priorityLevel: 1, |
|||
conditionGroupList: [], |
|||
conditionExpression: '', |
|||
exclusiveBranchNode: JSON.stringify(props.childNodeP) == '{}' ? null : props.childNodeP, |
|||
}, |
|||
{ |
|||
name: '默认条件', |
|||
jumpId: '', |
|||
conditionType: 1, |
|||
priorityLevel: 1, |
|||
conditionGroupList: null, |
|||
conditionExpression: '', |
|||
exclusiveBranchNode: null, |
|||
}, |
|||
], |
|||
}); |
|||
} |
|||
}; |
|||
</script> |
|||
<style scoped lang="less"> |
|||
.add-node-btn-box { |
|||
width: 240px; |
|||
display: -webkit-inline-box; |
|||
display: -ms-inline-flexbox; |
|||
display: inline-flex; |
|||
-ms-flex-negative: 0; |
|||
flex-shrink: 0; |
|||
-webkit-box-flex: 1; |
|||
-ms-flex-positive: 1; |
|||
position: relative; |
|||
|
|||
&:before { |
|||
content: ''; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
z-index: -1; |
|||
margin: auto; |
|||
width: 2px; |
|||
height: 100%; |
|||
background-color: #cacaca; |
|||
} |
|||
|
|||
.add-node-btn { |
|||
user-select: none; |
|||
width: 240px; |
|||
padding: 20px 0 32px; |
|||
display: flex; |
|||
-webkit-box-pack: center; |
|||
justify-content: center; |
|||
flex-shrink: 0; |
|||
-webkit-box-flex: 1; |
|||
flex-grow: 1; |
|||
|
|||
.btn { |
|||
outline: none; |
|||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1); |
|||
width: 30px; |
|||
height: 30px; |
|||
background: #3296fa; |
|||
border-radius: 50%; |
|||
position: relative; |
|||
border: none; |
|||
line-height: 30px; |
|||
-webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); |
|||
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); |
|||
|
|||
.iconfont { |
|||
color: #fff; |
|||
font-size: 16px; |
|||
} |
|||
|
|||
// &:hover { |
|||
// transform: scale(1.3); |
|||
// box-shadow: 0 13px 27px 0 rgba(0, 0, 0, 0.1); |
|||
// } |
|||
|
|||
&:active { |
|||
transform: none; |
|||
background: #1e83e9; |
|||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
<style lang="less"> |
|||
.add-node-popover-body { |
|||
.add-node-popover-item { |
|||
display: block; |
|||
margin: 10px 0; |
|||
cursor: pointer; |
|||
text-align: center; |
|||
color: #191f25 !important; |
|||
padding: 5px 12px; |
|||
border: 1px solid #ccc; |
|||
border-radius: 4px; |
|||
&:hover { |
|||
p { |
|||
color: #1bb6b6; |
|||
} |
|||
|
|||
.iconfont { |
|||
color: #fff; |
|||
} |
|||
} |
|||
|
|||
&:active { |
|||
.item-wrapper { |
|||
box-shadow: none; |
|||
background: #eaeaea; |
|||
} |
|||
|
|||
.iconfont { |
|||
color: inherit; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,144 +0,0 @@ |
|||
<template> |
|||
<Modal |
|||
title="审批人设置" |
|||
:destroyOnClose="true" |
|||
v-model:visible="visible" |
|||
class="set_promoter" |
|||
width="900px"> |
|||
<ns-form :model="approverConfig" :schemas="formSchema" ref="approverForm" /> |
|||
{{ approverForm?.validatorResult }} |
|||
<template #footer> |
|||
<a-button type="primary" @click="saveApprover" :disabled="buttonDisabled"> 确 定 </a-button> |
|||
<a-button @click="closeDrawer">取 消</a-button> |
|||
</template> |
|||
</Modal> |
|||
</template> |
|||
<script setup> |
|||
import { ref, watch, computed, provide, nextTick } from 'vue'; |
|||
import $func from '/@/utils/index'; |
|||
import { setTypes, selectModes, selectRanges } from '/@/utils/const'; |
|||
import { useStore } from '/@/stores/index'; |
|||
import { Modal } from 'ant-design-vue'; |
|||
import assigneeForm from './drawerComponents/assignee/assigneeForm.vue'; |
|||
|
|||
let props = defineProps({ |
|||
directorMaxLevel: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
}); |
|||
provide('components', () => { |
|||
return { assigneeForm }; |
|||
}); |
|||
let approverForm = ref(); |
|||
let approverConfig = ref({}); |
|||
let store = useStore(); |
|||
let { setApproverConfig, setApprover } = store; |
|||
let approverConfig1 = computed(() => store.approverConfig1); |
|||
let approverDrawer = computed(() => store.approverDrawer); |
|||
let visible = computed({ |
|||
get() { |
|||
return approverDrawer.value; |
|||
}, |
|||
set() { |
|||
closeDrawer(); |
|||
}, |
|||
}); |
|||
let validateResult = computed(() => { |
|||
return approverForm.value?.validateResult; |
|||
}); |
|||
let disabled = ref(false); |
|||
let buttonDisabled = ref(true); |
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'name', |
|||
label: '节点名称', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
validator: async (rule, value) => { |
|||
if (!value) { |
|||
return Promise.reject('节点名称不能为空'); |
|||
} |
|||
const unicRegexp = new RegExp('[\u4e00-\u9fa5]', 'g'); |
|||
let unicValue = value; |
|||
unicValue = value.replace(unicRegexp, 'aa'); |
|||
if (!/^[a-zA-Z\d\u4e00-\u9fa5]{2,20}$/.test(unicValue)) { |
|||
return Promise.reject('支持数字,大小写字母,中文,2-20字符,中文占两位'); |
|||
} |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: '', |
|||
label: '', |
|||
component: 'NsInputText', |
|||
componentProps: { |
|||
placeholder: '', |
|||
}, |
|||
}, |
|||
{ |
|||
field: '', |
|||
label: '', |
|||
component: 'NsInputText', |
|||
componentProps: { |
|||
placeholder: '', |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'assignee', |
|||
label: '', |
|||
component: 'assigneeForm', |
|||
class: 'ns-form-item-full', |
|||
componentProps: { |
|||
placeholder: '', |
|||
onValidator: (value) => { |
|||
disabled.value = value; |
|||
}, |
|||
}, |
|||
}, |
|||
]); |
|||
// watch(approverConfig1, (val) => { |
|||
// approverConfig.value = val.value; |
|||
// }); |
|||
// 监听form是否已经加载和值是否改变,监听form是为了处理校验规则问题,避免赋值后表单才加载 |
|||
watch([approverForm, approverConfig1], (val) => { |
|||
if (val[0]) approverConfig.value = val[1].value; |
|||
}); |
|||
watch( |
|||
() => [validateResult.value, disabled.value], |
|||
(val) => { |
|||
if (!val[0]) { |
|||
buttonDisabled.value = true; |
|||
} |
|||
if (val[0]) { |
|||
if (!val[1]) buttonDisabled.value = true; |
|||
if (val[1]) buttonDisabled.value = false; |
|||
} |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
const saveApprover = () => { |
|||
console.log(approverConfig.value); |
|||
approverConfig.value.error = !$func.setApproverStr(approverConfig.value); |
|||
setApproverConfig({ |
|||
value: approverConfig.value, |
|||
flag: true, |
|||
id: approverConfig1.value.id, |
|||
}); |
|||
closeDrawer(); |
|||
}; |
|||
const closeDrawer = () => { |
|||
setApprover(false); |
|||
}; |
|||
</script> |
|||
<style lang="less" scoped> |
|||
:deep(.ns-form.ns-vertical-form) { |
|||
width: 100% !important; |
|||
} |
|||
</style> |
@ -1,167 +0,0 @@ |
|||
<template> |
|||
<Modal |
|||
:destroyOnClose="true" |
|||
title="条件设置" |
|||
v-model:visible="visible" |
|||
width="900px" |
|||
class="condition_copyer"> |
|||
<ns-form :model="conditionConfig" :schemas="formSchema" ref="nsFormRef" /> |
|||
<template #footer> |
|||
<a-button type="primary" @click="saveCondition" :disabled="buttonDisabled">确 定</a-button> |
|||
<a-button @click="closeDrawer">取 消</a-button> |
|||
</template> |
|||
</Modal> |
|||
</template> |
|||
<script setup> |
|||
import { ref, watch, computed, provide, nextTick } from 'vue'; |
|||
import $func from '/@/utils/index'; |
|||
import { useStore } from '/@/stores/index'; |
|||
import { SelectType } from '/@/utils/const'; |
|||
import { Modal } from 'ant-design-vue'; |
|||
import gruopList from './drawerComponents/groupList/groupList.vue'; |
|||
provide('components', () => { |
|||
return { gruopList }; |
|||
}); |
|||
|
|||
let conditionsConfig = ref({ |
|||
exclusive: [], |
|||
}); |
|||
let conditionConfig = ref({}); |
|||
let PriorityLevel = ref(''); |
|||
let nsFormRef = ref(); |
|||
|
|||
let store = useStore(); |
|||
let { setCondition, setConditionsConfig } = store; |
|||
let conditionsConfig1 = computed(() => store.conditionsConfig1); |
|||
let conditionDrawer = computed(() => store.conditionDrawer); |
|||
let visible = computed({ |
|||
get() { |
|||
return conditionDrawer.value; |
|||
}, |
|||
set() { |
|||
closeDrawer(); |
|||
}, |
|||
}); |
|||
|
|||
let options = ref([]); |
|||
watch(conditionsConfig1, (val) => { |
|||
conditionsConfig.value = val.value; |
|||
PriorityLevel.value = val.priorityLevel; |
|||
options.value = []; |
|||
for (let i = 1; i < conditionsConfig.value.exclusive.length; i++) { |
|||
options.value.push({ |
|||
label: `优先级${i}`, |
|||
value: i, |
|||
}); |
|||
} |
|||
nextTick(() => { |
|||
conditionConfig.value = val.priorityLevel |
|||
? conditionsConfig.value.exclusive[val.priorityLevel - 1] |
|||
: { conditionGroupList: [] }; |
|||
conditionConfig.value.priorityLevel = val.priorityLevel; |
|||
}); |
|||
}); |
|||
|
|||
let disabled = ref(false); |
|||
let buttonDisabled = ref(true); |
|||
let validateResult = computed(() => { |
|||
return nsFormRef.value?.validateResult; |
|||
}); |
|||
|
|||
watch( |
|||
() => [validateResult.value, disabled.value], |
|||
(val) => { |
|||
if (!val[0]) { |
|||
buttonDisabled.value = true; |
|||
} |
|||
if (val[0]) { |
|||
if (!val[1]) buttonDisabled.value = true; |
|||
if (val[1]) buttonDisabled.value = false; |
|||
} |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
|
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'name', |
|||
label: '条件名称', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
validator: async (rule, value) => { |
|||
if (!value) { |
|||
return Promise.reject('条件名称不能为空'); |
|||
} |
|||
const unicRegexp = new RegExp('[\u4e00-\u9fa5]', 'g'); |
|||
let unicValue = value; |
|||
unicValue = value.replace(unicRegexp, 'aa'); |
|||
if (!/^[a-zA-Z\d\u4e00-\u9fa5]{2,20}$/.test(unicValue)) { |
|||
return Promise.reject('支持数字,大小写字母,中文,2-20字符,中文占两位'); |
|||
} |
|||
}, |
|||
trigger: 'change', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'priorityLevel', |
|||
label: '优先级', |
|||
component: 'NsSelect', |
|||
componentProps: { |
|||
placeholder: '请选择', |
|||
options: options, |
|||
}, |
|||
}, |
|||
{ |
|||
field: '', |
|||
label: '', |
|||
component: 'NsInputText', |
|||
}, |
|||
{ |
|||
field: 'conditionGroupList', |
|||
label: '', |
|||
component: 'gruopList', |
|||
class: 'ns-form-item-full', |
|||
componentProps: { |
|||
onValidator: (val) => { |
|||
disabled.value = val; |
|||
}, |
|||
}, |
|||
}, |
|||
]); |
|||
|
|||
const saveCondition = () => { |
|||
closeDrawer(); |
|||
// 调整优先级位置的方法 |
|||
var a = conditionsConfig.value.exclusive.splice(PriorityLevel.value - 1, 1); //截取旧下标 |
|||
conditionsConfig.value.exclusive.splice(conditionConfig.value.priorityLevel - 1, 0, a[0]); //填充新下标 |
|||
conditionsConfig.value.exclusive.map((item, index) => { |
|||
item.priorityLevel = index + 1; |
|||
}); |
|||
for (var i = 0; i < conditionsConfig.value.exclusive.length; i++) { |
|||
conditionsConfig.value.exclusive[i].error = |
|||
$func.conditionStr(conditionsConfig.value, i) == '请设置条件' && |
|||
i != conditionsConfig.value.exclusive.length - 1; |
|||
} |
|||
// 存储数据的方法 |
|||
setConditionsConfig({ |
|||
value: conditionsConfig.value, |
|||
flag: true, |
|||
id: conditionsConfig1.value.id, |
|||
}); |
|||
}; |
|||
|
|||
const closeDrawer = (val) => { |
|||
setCondition(false); |
|||
}; |
|||
</script> |
|||
<style lang="less" scoped> |
|||
:deep(.ns-form::after) { |
|||
display: none !important; |
|||
} |
|||
</style> |
@ -1,338 +0,0 @@ |
|||
<template> |
|||
<div class="group"> |
|||
<ns-form :model="data" :schemas="formSchema" ref="nsFormRef" /> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { ref, defineComponent, watch, provide, computed, nextTick } from 'vue'; |
|||
import selectPerson from '../formComponents/selectPerson.vue'; |
|||
import overDot from '../formComponents/overDot.vue'; |
|||
export default defineComponent({ |
|||
components: {}, |
|||
props: { |
|||
value: { |
|||
type: Object, |
|||
default: () => [], |
|||
}, |
|||
}, |
|||
emits: ['change', 'validator'], |
|||
setup(props, { emit }) { |
|||
provide('components', () => { |
|||
return { selectPerson, overDot }; |
|||
}); |
|||
let data = ref({ |
|||
assigneeIsEmpty: '', |
|||
assigneeList: null, |
|||
assigneeListUser: [], |
|||
assigneeType: '', |
|||
completionConditionExpression: '', |
|||
lastLeaderLevel: '', |
|||
multiMode: '', |
|||
roleList: [], |
|||
dotDesc: '', |
|||
}); |
|||
if (props.value) { |
|||
nextTick(() => { |
|||
data.value = props.value; |
|||
data.value.lastLeaderLevel = props.value.lastLeaderLevel; |
|||
}); |
|||
} |
|||
let nsFormRef = ref(); |
|||
const validateResult = computed(() => { |
|||
return nsFormRef.value?.validateResult; |
|||
}); |
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'userType', |
|||
label: '设置审批人', |
|||
component: 'NsRadioGroup', |
|||
class: 'ns-form-item-full', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
styleType: { flex: true }, |
|||
radioType: 'radio', |
|||
options: [ |
|||
{ |
|||
label: '指定员工', |
|||
value: 1, |
|||
disabled: true, |
|||
}, |
|||
{ |
|||
label: '所属部门负责人', |
|||
value: 2, |
|||
}, |
|||
{ |
|||
label: '主部门负责人', |
|||
value: 3, |
|||
}, |
|||
{ |
|||
label: '发起人自己', |
|||
value: 4, |
|||
}, |
|||
{ |
|||
label: '直属上级', |
|||
value: 5, |
|||
}, |
|||
{ |
|||
label: '连续多级主管', |
|||
value: 6, |
|||
}, |
|||
{ |
|||
label: '角色(角色中的部门负责人)', |
|||
value: 8, |
|||
disabled: true, |
|||
}, |
|||
], |
|||
onChange: (val) => { |
|||
if (val !== 6) data.value.assigneeType = val.target.value; |
|||
}, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: '设置审批人', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'assigneeListUser', |
|||
label: '指定员工', |
|||
component: 'selectPerson', |
|||
class: 'ns-form-item-full', |
|||
ifShow: (formModel) => { |
|||
return formModel.userType == '1'; |
|||
}, |
|||
componentProps: { |
|||
onChange: (value) => { |
|||
if (!value || !value.length) { |
|||
data.value.assigneeList = null; |
|||
} else { |
|||
data.value.assigneeList = value.map((item) => { |
|||
return item.personUuid; |
|||
}); |
|||
} |
|||
|
|||
data.value.assigneeListUser = value; |
|||
}, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: '指定员工', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'createUserRole', |
|||
label: '选择角色', |
|||
component: 'NsSelectApi', |
|||
ifShow: (formModel) => { |
|||
return formModel.userType == 8; |
|||
}, |
|||
componentProps: { |
|||
placeholder: '请选择角色', |
|||
api: '/api/community/objs/admin/Role', |
|||
params: { |
|||
pageSize: 10, |
|||
}, |
|||
resultField: 'data.data', |
|||
labelField: 'roleName', |
|||
valueField: 'roleUuid', |
|||
filterFiled: 'roleName', |
|||
scrollLoad: true, |
|||
labelInValue: true, |
|||
mode: 'multiple', |
|||
showSearch: true, |
|||
onChange: (val, opt) => { |
|||
data.value.roleList = val.map((item) => { |
|||
return item.value; |
|||
}); |
|||
}, |
|||
immediate: true, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: '选择角色', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'multiMode', |
|||
label: '多人审批时采用的审批方式', |
|||
component: 'NsRadioGroup', |
|||
class: 'ns-form-item-full', |
|||
ifShow: (formModel) => { |
|||
if (formModel.userType == 1 && formModel.assigneeList?.length > 1) { |
|||
return true; |
|||
} |
|||
if ([2, 3, 6, 8].includes(formModel.userType)) { |
|||
return true; |
|||
} |
|||
}, |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
radioType: 'radio', |
|||
options: [ |
|||
{ |
|||
label: '会签(需要所有审批人都同意才可通过)', |
|||
value: 2, |
|||
}, |
|||
{ |
|||
label: '或签(其中一名审批人同意或拒绝即可)', |
|||
value: 3, |
|||
}, |
|||
{ |
|||
label: '依次审批(按顺序同意或拒绝)', |
|||
value: 1, |
|||
}, |
|||
], |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: '多人审批时采用的审批方式', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'overDot', |
|||
label: '审批终点', |
|||
component: 'overDot', |
|||
class: 'ns-form-item-full', |
|||
ifShow: (formModel) => { |
|||
return formModel.userType == 6; |
|||
}, |
|||
componentProps: { |
|||
onChange: (val) => { |
|||
if (val) { |
|||
data.value.assigneeType = val[0]; |
|||
data.value.lastLeaderLevel = val[1]; |
|||
} |
|||
}, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: '审批终点', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'lastLeaderLevel', |
|||
label: '直属上级', |
|||
component: 'NsSelect', |
|||
ifShow: (formModel) => { |
|||
return formModel.userType == 5; |
|||
}, |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
options: [ |
|||
{ |
|||
label: '直属上级', |
|||
value: 1, |
|||
}, |
|||
{ |
|||
label: '第2级直属上级', |
|||
value: 2, |
|||
}, |
|||
{ |
|||
label: '第3级直属上级', |
|||
value: 3, |
|||
}, |
|||
{ |
|||
label: '第4级直属上级', |
|||
value: 4, |
|||
}, |
|||
{ |
|||
label: '第5级直属上级', |
|||
value: 5, |
|||
}, |
|||
{ |
|||
label: '第6级直属上级', |
|||
value: 6, |
|||
}, |
|||
{ |
|||
label: '第7级直属上级', |
|||
value: 7, |
|||
}, |
|||
{ |
|||
label: '第8级直属上级', |
|||
value: 8, |
|||
}, |
|||
{ |
|||
label: '第9级直属上级', |
|||
value: 9, |
|||
}, |
|||
{ |
|||
label: '第10级直属上级', |
|||
value: 10, |
|||
}, |
|||
], |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: '直属上级', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'assigneeIsEmpty', |
|||
label: '审批人为空时', |
|||
component: 'NsRadioGroup', |
|||
class: 'ns-form-item-full', |
|||
ifShow: (formModel) => { |
|||
return formModel.userType && formModel.userType !== 4; |
|||
}, |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
radioType: 'radio', |
|||
options: [ |
|||
{ |
|||
label: '自动通过', |
|||
value: 1, |
|||
}, |
|||
{ |
|||
label: '自动转交给管理员', |
|||
value: 2, |
|||
}, |
|||
], |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: '审批人为空时', |
|||
}, |
|||
], |
|||
}, |
|||
]); |
|||
|
|||
watch( |
|||
() => data.value.assigneeType, |
|||
(val) => { |
|||
emit('change', data.value); |
|||
}, |
|||
{ |
|||
deep: true, |
|||
}, |
|||
); |
|||
watch( |
|||
() => validateResult.value, |
|||
(val) => { |
|||
emit('validator', val); |
|||
}, |
|||
{ |
|||
deep: true, |
|||
}, |
|||
); |
|||
return { |
|||
data, |
|||
formSchema, |
|||
nsFormRef, |
|||
validateResult, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,177 +0,0 @@ |
|||
<template> |
|||
<a-form-item-rest> |
|||
<div class="overDot"> |
|||
<a-radio-group v-model:value="radioData" @change="handleChange"> |
|||
<a-radio :style="radioStyle" :value="6"> 不超过发起人向上的 </a-radio> |
|||
<a-radio :style="radioStyle" :value="7"> 组织架构中的 </a-radio> |
|||
</a-radio-group> |
|||
<div class="options"> |
|||
<ns-select |
|||
style="width: 200px; display: block; margin-bottom: 10px" |
|||
:disabled="radioData !== 6" |
|||
:options="opt1" |
|||
v-model:value="levelData[6]" /> |
|||
<ns-select |
|||
style="width: 200px; display: block" |
|||
:disabled="radioData !== 7" |
|||
:options="opt2" |
|||
v-model:value="levelData[7]" /> |
|||
</div> |
|||
</div> |
|||
</a-form-item-rest> |
|||
</template> |
|||
<script> |
|||
import { ref, defineComponent, watch, reactive, nextTick } from 'vue'; |
|||
export default defineComponent({ |
|||
components: {}, |
|||
props: { |
|||
value: { |
|||
type: Array, |
|||
}, |
|||
}, |
|||
emits: ['change'], |
|||
setup(props, { emit }) { |
|||
let data = ref([]); |
|||
let radioData = ref(); |
|||
let levelData = ref([]); |
|||
if (props.value) { |
|||
nextTick(() => { |
|||
data.value = props.value; |
|||
radioData.value = props.value[0]; |
|||
levelData.value[props.value[0]] = props.value[1]; |
|||
emit('change', data.value); |
|||
}); |
|||
} |
|||
let options = [ |
|||
{ |
|||
label: '不超过发起人向上的', |
|||
value: 6, |
|||
}, |
|||
{ |
|||
label: '组织架构中的', |
|||
value: 7, |
|||
}, |
|||
]; |
|||
let opt1 = [ |
|||
{ |
|||
label: '1级主部门负责人', |
|||
value: 1, |
|||
}, |
|||
{ |
|||
label: '2级主部门负责人', |
|||
value: 2, |
|||
}, |
|||
{ |
|||
label: '3级主部门负责人', |
|||
value: 3, |
|||
}, |
|||
{ |
|||
label: '4级主部门负责人', |
|||
value: 4, |
|||
}, |
|||
{ |
|||
label: '5级主部门负责人', |
|||
value: 5, |
|||
}, |
|||
{ |
|||
label: '6级主部门负责人', |
|||
value: 6, |
|||
}, |
|||
{ |
|||
label: '7级主部门负责人', |
|||
value: 7, |
|||
}, |
|||
{ |
|||
label: '8级主部门负责人', |
|||
value: 8, |
|||
}, |
|||
{ |
|||
label: '9级主部门负责人', |
|||
value: 9, |
|||
}, |
|||
{ |
|||
label: '10级主部门负责人', |
|||
value: 10, |
|||
}, |
|||
]; |
|||
let opt2 = [ |
|||
{ |
|||
label: '最高级主部门负责人', |
|||
value: 1, |
|||
}, |
|||
{ |
|||
label: '第2级主部门负责人', |
|||
value: 2, |
|||
}, |
|||
{ |
|||
label: '第3级主部门负责人', |
|||
value: 3, |
|||
}, |
|||
{ |
|||
label: '第4级主部门负责人', |
|||
value: 4, |
|||
}, |
|||
{ |
|||
label: '第5级主部门负责人', |
|||
value: 5, |
|||
}, |
|||
{ |
|||
label: '第6级主部门负责人', |
|||
value: 6, |
|||
}, |
|||
{ |
|||
label: '第7级主部门负责人', |
|||
value: 7, |
|||
}, |
|||
{ |
|||
label: '第8级主部门负责人', |
|||
value: 8, |
|||
}, |
|||
{ |
|||
label: '第9级主部门负责人', |
|||
value: 9, |
|||
}, |
|||
{ |
|||
label: '10级主部门负责人', |
|||
value: 10, |
|||
}, |
|||
]; |
|||
const radioStyle = reactive({ |
|||
display: 'flex', |
|||
lineHeight: '40px', |
|||
}); |
|||
const handleChange = () => { |
|||
levelData.value = []; |
|||
}; |
|||
watch( |
|||
() => levelData.value, |
|||
(value) => { |
|||
data.value = [radioData.value, value[radioData.value]]; |
|||
emit('change', data.value); |
|||
}, |
|||
{ |
|||
deep: true, |
|||
}, |
|||
); |
|||
return { |
|||
data, |
|||
options, |
|||
radioStyle, |
|||
opt1, |
|||
opt2, |
|||
radioData, |
|||
levelData, |
|||
handleChange, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="less" scoped> |
|||
.overDot { |
|||
display: flex; |
|||
align-items: center; |
|||
.options { |
|||
line-height: 40px; |
|||
} |
|||
} |
|||
</style> |
@ -1,301 +0,0 @@ |
|||
<!-- @format --> |
|||
|
|||
<template> |
|||
<div> |
|||
<a @click="selectPerson(index)" class="option" v-if="!disabled">选择员工</a> |
|||
<div class="select-area" v-if="dataSource.length"> |
|||
<div class="select-item" v-for="(item, index) in dataSource" :key="item.personUuid"> |
|||
{{ item.personName }} |
|||
<a @click="remove(index)" v-if="!disabled"><delete-outlined /></a> |
|||
</div> |
|||
</div> |
|||
|
|||
<ns-modal |
|||
v-model:visible="visible" |
|||
title="选择员工" |
|||
width="1000px" |
|||
@ok="handleOk" |
|||
@cancel="cancel" |
|||
:destroyOnClose="true"> |
|||
<ns-view-list-table |
|||
v-bind="tableConfig" |
|||
style="width: 100%" |
|||
:row-selection="{ |
|||
selectedRowKeys: selectedRowKeys, |
|||
onChange: onSelectChange, |
|||
preserveSelectedRowKeys: true, |
|||
getCheckboxProps: getCheckboxProps, |
|||
}" /> |
|||
</ns-modal> |
|||
</div> |
|||
</template> |
|||
<script lang="ts"> |
|||
import { defineComponent, ref, reactive, watch, toRefs } from 'vue'; |
|||
import moment from 'moment'; |
|||
import { DeleteOutlined } from '@ant-design/icons-vue'; |
|||
import { cloneDeep } from 'lodash-es'; |
|||
|
|||
export default defineComponent({ |
|||
name: 'NsEditTableOrder', |
|||
components: { |
|||
'delete-outlined': DeleteOutlined, |
|||
}, |
|||
props: { |
|||
disabled: Boolean, |
|||
value: { |
|||
type: Array, |
|||
default: () => [], |
|||
}, |
|||
}, |
|||
emits: ['change'], |
|||
setup(props, context) { |
|||
const dataSource = ref(); |
|||
dataSource.value = []; |
|||
let visible = ref(false); |
|||
let selectData = ref([]); |
|||
let arr = ref([]); |
|||
|
|||
const state = reactive<{ |
|||
selectedRowKeys: []; |
|||
selectedRows: []; |
|||
}>({ |
|||
selectedRowKeys: [], |
|||
selectedRows: [], |
|||
}); |
|||
|
|||
const onSelectChange = (selectedRowKeys: [], selectedRows: []) => { |
|||
state.selectedRowKeys = selectedRowKeys; |
|||
state.selectedRows = selectedRows; |
|||
}; |
|||
|
|||
const handleOk = () => { |
|||
arr.value = []; |
|||
state.selectedRowKeys.forEach((item) => { |
|||
let info = state.selectedRows.filter((v) => v?.personUuid === item)[0]; |
|||
if (!info) { |
|||
let dInfo = selectData.value.filter((v) => v?.personUuid === item)[0]; |
|||
!dInfo ? '' : arr.value.push(dInfo); |
|||
} else { |
|||
arr.value.push(info); |
|||
} |
|||
}); |
|||
|
|||
dataSource.value = cloneDeep(arr.value); |
|||
selectData.value = cloneDeep(arr.value); |
|||
visible.value = false; |
|||
}; |
|||
|
|||
const selectPerson = (index) => { |
|||
visible.value = true; |
|||
}; |
|||
|
|||
const cancel = () => { |
|||
visible.value = false; |
|||
state.selectedRows = []; |
|||
state.selectedRows = cloneDeep(arr.value); |
|||
state.selectedRowKeys = cloneDeep( |
|||
arr.value.map((item) => { |
|||
return item.personUuid; |
|||
}), |
|||
); |
|||
}; |
|||
|
|||
const tableConfig = { |
|||
api: '/api/person/objs/admin/Person', |
|||
title: '', |
|||
params: { |
|||
page: 0, |
|||
pageSize: 10, |
|||
personStatus: 1, |
|||
}, |
|||
rowSelection: null, |
|||
sticky: false, |
|||
// scroll: { x: 1150 }, |
|||
columns: [ |
|||
{ |
|||
title: '姓名', |
|||
dataIndex: 'personName', |
|||
textNumber: 5, |
|||
textEllipsis: true, |
|||
}, |
|||
{ |
|||
title: '性别', |
|||
dataIndex: 'sex', |
|||
textNumber: 5, |
|||
customRender: (value) => { |
|||
switch (value.text) { |
|||
case 0: |
|||
return '女'; |
|||
case 1: |
|||
return '男'; |
|||
default: |
|||
return '-'; |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
title: '员工编号', |
|||
dataIndex: 'personNum', |
|||
// textNumber: 5, |
|||
}, |
|||
{ |
|||
title: '手机号码', |
|||
dataIndex: 'telNum', |
|||
// textNumber: 5, |
|||
}, |
|||
{ |
|||
title: '所属部门', |
|||
dataIndex: 'departmentNameList', |
|||
customRender: ({ value }) => { |
|||
if (value) return value.join('/'); |
|||
else return '-'; |
|||
}, |
|||
textNumber: 8, |
|||
textEllipsis: true, |
|||
}, |
|||
{ |
|||
title: '账号状态', |
|||
dataIndex: 'accountState', |
|||
customRender: (value) => { |
|||
switch (value.text) { |
|||
case 1: |
|||
return '启用'; |
|||
case 2: |
|||
return '禁用'; |
|||
default: |
|||
return '-'; |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
title: '在职状态', |
|||
dataIndex: 'personStatus', |
|||
customRender: (value) => { |
|||
switch (value.text) { |
|||
case 1: |
|||
return '在职'; |
|||
case 2: |
|||
return '离职'; |
|||
default: |
|||
return '-'; |
|||
} |
|||
}, |
|||
}, |
|||
], |
|||
formConfig: { |
|||
schemas: [ |
|||
{ |
|||
field: 'departmentUuid', |
|||
component: 'nsSelectApi', |
|||
label: '所属部门', |
|||
componentProps: { |
|||
placeholder: '请选择', |
|||
api: '/api/community/objs/admin/Department', |
|||
resultField: 'data.data', |
|||
labelField: 'departmentName', |
|||
valueField: 'departmentUuid', |
|||
autoSelectFirst: false, |
|||
immediate: true, |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'personName', |
|||
label: '员工姓名', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入员工姓名', |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'personNum', |
|||
label: '员工编号', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入员工编号', |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
rowKey: 'personUuid', |
|||
}; |
|||
|
|||
const remove = (index) => { |
|||
dataSource.value.splice(index, 1); |
|||
state.selectedRows.splice(index, 1); |
|||
state.selectedRowKeys.splice(index, 1); |
|||
// let arr = dataSource; |
|||
}; |
|||
|
|||
watch( |
|||
() => dataSource.value, |
|||
(val) => { |
|||
if (val !== null && val !== undefined) { |
|||
context.emit('change', val); |
|||
} |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
|
|||
if (props.value) { |
|||
dataSource.value = cloneDeep(props.value); |
|||
selectData.value = cloneDeep(props.value); |
|||
state.selectedRows = cloneDeep(props.value); |
|||
state.selectedRowKeys = cloneDeep( |
|||
props.value.map((item) => { |
|||
return item.personUuid; |
|||
}), |
|||
); |
|||
} |
|||
|
|||
const getCheckboxProps = (record) => { |
|||
if (state.selectedRowKeys.length > 10) { |
|||
state.selectedRowKeys.splice(10, state.selectedRowKeys.length - 1); |
|||
state.selectedRows.splice(10, state.selectedRowKeys.length - 1); |
|||
dataSource.value.splice(10, state.selectedRowKeys.length - 1); |
|||
selectData.value.splice(10, state.selectedRowKeys.length - 1); |
|||
} |
|||
if (state.selectedRowKeys.length >= 10) { |
|||
if (!state.selectedRowKeys.includes(record.personUuid)) { |
|||
return { |
|||
disabled: true, |
|||
}; |
|||
} |
|||
} else { |
|||
return { |
|||
disabled: false, |
|||
}; |
|||
} |
|||
}; |
|||
|
|||
return { |
|||
dataSource, |
|||
moment, |
|||
tableConfig, |
|||
visible, |
|||
getCheckboxProps, |
|||
onSelectChange, |
|||
handleOk, |
|||
cancel, |
|||
selectPerson, |
|||
remove, |
|||
...toRefs(state), |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="less" scoped> |
|||
.select-area { |
|||
width: 100%; |
|||
border: 1px solid #ccc; |
|||
padding: 5px 10px; |
|||
max-height: 150px; |
|||
overflow-y: auto; |
|||
margin-top: 10px; |
|||
.select-item { |
|||
padding: 5px; |
|||
display: inline-block; |
|||
border: 1px solid #ccc; |
|||
margin: 5px; |
|||
} |
|||
} |
|||
</style> |
@ -1,69 +0,0 @@ |
|||
<template> |
|||
<div class="faqiren"> |
|||
<ns-form :model="data" :schemas="formSchema" /> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { nextTick, ref, watch } from 'vue'; |
|||
const emits = defineEmits(['update:modelValue', 'change']); |
|||
const props = defineProps({ |
|||
modelValue: { |
|||
type: Object, |
|||
}, |
|||
}); |
|||
let data = ref({ |
|||
compareType: 'in', |
|||
numberAfterCompareType: false, |
|||
paramKey: 'departmentInUuid', |
|||
value: [], |
|||
valueType: 'number', |
|||
checkbox: 'departmentInUuid', |
|||
dotDesc: null, |
|||
}); |
|||
emits('update:modelValue', data.value); |
|||
if (props.modelValue) { |
|||
if (props.modelValue.checkbox == 'departmentInUuid') { |
|||
data.value = props.modelValue; |
|||
data.value.departmentInUuid = props.modelValue.value; |
|||
emits('update:modelValue', data.value); |
|||
} |
|||
} |
|||
|
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'departmentInUuid', |
|||
label: '调入主部门', |
|||
component: 'NsSelectApi', |
|||
componentProps: { |
|||
placeholder: '请选择调入主部门', |
|||
api: '/api/community/objs/admin/Department', |
|||
resultField: 'data.data', |
|||
labelField: 'departmentName', |
|||
valueField: 'departmentUuid', |
|||
filterOption: (input, option) => { |
|||
return option.departmentName.indexOf(input) >= 0; |
|||
}, |
|||
mode: 'multiple', |
|||
showSearch: true, |
|||
onChange: (v, o) => { |
|||
console.log(o); |
|||
if (o && o.length > 1) o.splice(0, 1); |
|||
if (v && v.length > 1) v.splice(0, 1); |
|||
let str = ''; |
|||
str = '调入主部门为' + o[0]?.departmentName; |
|||
data.value.dotDesc = str; |
|||
data.value.value = v; |
|||
}, |
|||
immediate: true, |
|||
}, |
|||
}, |
|||
]); |
|||
watch( |
|||
() => data.value, |
|||
(val) => { |
|||
emits('update:modelValue', val); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,69 +0,0 @@ |
|||
<template> |
|||
<div class="faqiren"> |
|||
<ns-form :model="data" :schemas="formSchema" /> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { nextTick, ref, watch } from 'vue'; |
|||
const emits = defineEmits(['update:modelValue', 'change']); |
|||
const props = defineProps({ |
|||
modelValue: { |
|||
type: Object, |
|||
}, |
|||
}); |
|||
let data = ref({ |
|||
compareType: 'in', |
|||
numberAfterCompareType: false, |
|||
paramKey: 'departmentMainUuid', |
|||
value: [], |
|||
valueType: 'number', |
|||
checkbox: 'departmentMainUuid', |
|||
dotDesc: null, |
|||
}); |
|||
emits('update:modelValue', data.value); |
|||
if (props.modelValue) { |
|||
if (props.modelValue.checkbox == 'departmentMainUuid') { |
|||
data.value = props.modelValue; |
|||
data.value.departmentMainUuid = props.modelValue.value; |
|||
emits('update:modelValue', data.value); |
|||
} |
|||
} |
|||
|
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'departmentMainUuid', |
|||
label: '主部门', |
|||
component: 'NsSelectApi', |
|||
componentProps: { |
|||
placeholder: '请选择主部门', |
|||
api: '/api/community/objs/admin/Department', |
|||
resultField: 'data.data', |
|||
labelField: 'departmentName', |
|||
valueField: 'departmentUuid', |
|||
filterOption: (input, option) => { |
|||
return option.departmentName.indexOf(input) >= 0; |
|||
}, |
|||
mode: 'multiple', |
|||
showSearch: true, |
|||
onChange: (v, o) => { |
|||
console.log(o); |
|||
if (o && o.length > 1) o.splice(0, 1); |
|||
if (v && v.length > 1) v.splice(0, 1); |
|||
let str = ''; |
|||
str = '主部门为' + o[0]?.departmentName; |
|||
data.value.dotDesc = str; |
|||
data.value.value = v; |
|||
}, |
|||
immediate: true, |
|||
}, |
|||
}, |
|||
]); |
|||
watch( |
|||
() => data.value, |
|||
(val) => { |
|||
emits('update:modelValue', val); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,186 +0,0 @@ |
|||
<template> |
|||
<div class="faqiren"> |
|||
<ns-form :model="data" :schemas="formSchema" /> |
|||
</div> |
|||
</template> |
|||
<script setup> |
|||
import { cloneDeep } from 'lodash-es'; |
|||
import { ref, watch, provide, nextTick } from 'vue'; |
|||
import selectPerson from '../formComponents/selectPerson.vue'; |
|||
const emits = defineEmits(['update:modelValue']); |
|||
provide('components', () => { |
|||
return { selectPerson }; |
|||
}); |
|||
const props = defineProps({ |
|||
modelValue: Object, |
|||
}); |
|||
let data = ref({ |
|||
compareType: 'in', |
|||
numberAfterCompareType: false, |
|||
paramKey: '', |
|||
value: [], |
|||
valueCp: [], |
|||
valueType: 'string', |
|||
checkbox: 'faqiren', |
|||
selectLabel: '', |
|||
dotDesc: '', |
|||
}); |
|||
emits('update:modelValue', data.value); |
|||
if (props.modelValue) { |
|||
if (props.modelValue.checkbox == 'faqiren') { |
|||
data.value = props.modelValue; |
|||
data.value.createUser = props.modelValue.valueCp; |
|||
data.value.createUserRole = props.modelValue.createUserRole; |
|||
emits('update:modelValue', data.value); |
|||
} |
|||
} |
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'paramKey', |
|||
label: '发起人', |
|||
component: 'NsSelect', |
|||
componentProps: { |
|||
placeholder: '请选择', |
|||
options: [ |
|||
{ |
|||
label: '指定员工', |
|||
value: 'createUser', |
|||
}, |
|||
{ |
|||
label: '指定部门', |
|||
value: 'createUserDepartment', |
|||
}, |
|||
{ |
|||
label: '指定角色', |
|||
value: 'createUserRole', |
|||
}, |
|||
], |
|||
onChange: () => { |
|||
data.value.value = []; |
|||
data.value.valueCp = []; |
|||
}, |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'createUser', |
|||
label: '选择员工', |
|||
component: 'selectPerson', |
|||
ifShow: (formModel) => { |
|||
return formModel.paramKey == 'createUser'; |
|||
}, |
|||
componentProps: { |
|||
onChange: (value) => { |
|||
let str = ''; |
|||
data.value.value = value.map((item) => { |
|||
return item.personUuid; |
|||
}); |
|||
data.value.valueCp = value; |
|||
|
|||
if (value && value.length) { |
|||
str = |
|||
'指定员工为' + |
|||
value |
|||
.map((item) => { |
|||
return item.personName; |
|||
}) |
|||
.join(','); |
|||
} else { |
|||
str = ''; |
|||
} |
|||
data.value.dotDesc = str; |
|||
}, |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'value', |
|||
label: '选择部门', |
|||
component: 'NsSelectApi', |
|||
ifShow: (formModel) => { |
|||
return formModel.paramKey == 'createUserDepartment'; |
|||
}, |
|||
componentProps: { |
|||
placeholder: '请选择部门', |
|||
api: '/api/community/objs/admin/Department', |
|||
resultField: 'data.data', |
|||
labelField: 'departmentName', |
|||
valueField: 'departmentUuid', |
|||
filterOption: (input, option) => { |
|||
return option.departmentName.indexOf(input) >= 0; |
|||
}, |
|||
mode: 'multiple', |
|||
showSearch: true, |
|||
onChange: (val, opt) => { |
|||
let str = ''; |
|||
if (opt && opt.length) { |
|||
str = |
|||
'指定部门为' + |
|||
opt |
|||
.map((item) => { |
|||
return item.departmentName; |
|||
}) |
|||
.join(','); |
|||
} else { |
|||
str = ''; |
|||
} |
|||
data.value.dotDesc = str; |
|||
}, |
|||
immediate: true, |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'createUserRole', |
|||
label: '选择角色', |
|||
component: 'NsSelectApi', |
|||
ifShow: (formModel) => { |
|||
return formModel.paramKey == 'createUserRole'; |
|||
}, |
|||
componentProps: { |
|||
placeholder: '请选择角色', |
|||
api: '/api/community/objs/admin/Role', |
|||
params: { |
|||
pageSize: 10, |
|||
}, |
|||
resultField: 'data.data', |
|||
labelField: 'roleName', |
|||
valueField: 'roleUuid', |
|||
filterFiled: 'roleName', |
|||
labelInValue: true, |
|||
scrollLoad: true, |
|||
mode: 'multiple', |
|||
showSearch: true, |
|||
onChange: (val, opt) => { |
|||
let str = ''; |
|||
data.value.value = val.map((item) => { |
|||
return item.value; |
|||
}); |
|||
if (val && val.length) { |
|||
str = |
|||
'指定角色为' + |
|||
val |
|||
.map((item) => { |
|||
return item.label; |
|||
}) |
|||
.join(','); |
|||
} else { |
|||
str = ''; |
|||
} |
|||
data.value.dotDesc = str; |
|||
}, |
|||
immediate: true, |
|||
}, |
|||
}, |
|||
{ |
|||
field: '', |
|||
label: '', |
|||
component: 'NsInputText', |
|||
}, |
|||
]); |
|||
watch( |
|||
() => data.value, |
|||
(val) => { |
|||
emits('update:modelValue', val); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,247 +0,0 @@ |
|||
<template> |
|||
<div class="group"> |
|||
<a-form-item-rest> |
|||
<div class="header"> |
|||
<div class="title"><span style="color: red">*</span> 条件组</div> |
|||
<div class="title"> |
|||
<ns-button type="primary" @click="addGroup">新增条件组</ns-button> |
|||
</div> |
|||
</div> |
|||
<div class="list"> |
|||
<div class="list-item" v-for="(item, index) in groupList" :key="index"> |
|||
<div class="header"> |
|||
<div class="title">条件组{{ index + 1 }}</div> |
|||
<div class="group_check"> |
|||
<ns-checkbox |
|||
@change="change($event, index, i)" |
|||
v-for="(checkbox, i) in SelectType[parseInt(processInfo.processSubType)]" |
|||
v-model:checked="selectValue[index][i]" |
|||
:value="checkbox" |
|||
:key="checkbox.value"> |
|||
{{ checkbox.label }} |
|||
</ns-checkbox> |
|||
<!-- <ns-checkbox-group |
|||
:options="SelectType[parseInt(processInfo.processSubType)]" |
|||
v-model:value="selectComponent[index]" |
|||
@change="change" /> --> |
|||
</div> |
|||
<div class="delete"> |
|||
<a @click="deleteGroup(index)"> <delete-outlined /> 删除</a> |
|||
</div> |
|||
</div> |
|||
<div class="group_info_list"> |
|||
<template v-for="(c, j) in selectComponent[index]" :key="j"> |
|||
<component :is="c?.value" v-model="groupList[index].conditionInfoList[j]" /> |
|||
<span class="error" v-if="!groupList[index].conditionInfoList[j]?.paramKey"> |
|||
条件内容不能为空 |
|||
</span> |
|||
<span |
|||
class="error" |
|||
v-if=" |
|||
groupList[index].conditionInfoList[j]?.paramKey && |
|||
!groupList[index].conditionInfoList[j]?.value?.length |
|||
"> |
|||
条件值不能为空 |
|||
</span> |
|||
<div |
|||
class="and" |
|||
v-if="selectComponent[index].length > 0 && j < selectComponent[index].length - 1"> |
|||
且 |
|||
</div> |
|||
</template> |
|||
<span class="error" v-if="!selectComponent[index]?.length">请选择条件</span> |
|||
</div> |
|||
<div class="or" v-if="groupList.length > 0 && index < groupList.length - 1">或</div> |
|||
</div> |
|||
</div> |
|||
</a-form-item-rest> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { ref, defineComponent, watch, nextTick, inject } from 'vue'; |
|||
import { DeleteOutlined } from '@ant-design/icons-vue'; |
|||
import { SelectType } from '/@/utils/const'; |
|||
import faqiren from './faqiren.vue'; |
|||
import sex from './sex.vue'; |
|||
import departmentMainUuid from './departmentMainUuid.vue'; |
|||
import personStatus from './personStatus.vue'; |
|||
import quitType from './quitType.vue'; |
|||
import quitReason from './quitReason.vue'; |
|||
import workHandover from './workHandover.vue'; |
|||
import departmentInUuid from './departmentInUuid.vue'; |
|||
import { cloneDeep } from 'lodash-es'; |
|||
export default defineComponent({ |
|||
components: { |
|||
DeleteOutlined, |
|||
faqiren, |
|||
sex, |
|||
departmentMainUuid, |
|||
personStatus, |
|||
quitType, |
|||
quitReason, |
|||
workHandover, |
|||
departmentInUuid, |
|||
}, |
|||
props: { |
|||
value: { |
|||
type: Array, |
|||
default: () => [], |
|||
}, |
|||
}, |
|||
emits: ['change', 'validator'], |
|||
setup(props, { emit }) { |
|||
let groupList = ref([]); |
|||
let selectComponent = ref([]); |
|||
let selectValue = ref([]); |
|||
emit('validator', false); |
|||
const addGroup = () => { |
|||
groupList.value.push({ |
|||
conditionInfoList: [], |
|||
}); |
|||
selectValue.value.push([]); |
|||
}; |
|||
const deleteGroup = (index) => { |
|||
groupList.value.splice(index, 1); |
|||
selectComponent.value.splice(index, 1); |
|||
}; |
|||
const change = (value, groupIndex, checkboxIndex) => { |
|||
// value = JSON.parse(value); |
|||
if (value.target.checked) { |
|||
selectComponent.value[groupIndex].push(value.target.value); |
|||
// groupList.value[groupIndex].conditionInfoList.splice(index, 1); |
|||
// selectComponent.value[groupIndex] = selectComponent.value[groupIndex].sort((a, b) => { |
|||
// return a.sort - b.sort; |
|||
// }); |
|||
} else { |
|||
let index = 0; |
|||
index = selectComponent.value[groupIndex].findIndex((item) => { |
|||
return item.label == value.target.value.label; |
|||
}); |
|||
selectComponent.value[groupIndex].splice(index, 1); |
|||
groupList.value[groupIndex].conditionInfoList.splice(index, 1); |
|||
} |
|||
console.log(groupList); |
|||
}; |
|||
|
|||
let processInfo = inject('processInfo'); |
|||
|
|||
watch( |
|||
() => props.value, |
|||
(val) => { |
|||
groupList.value = props.value; |
|||
for (let i = 0; i < props.value.length; i++) { |
|||
const item = props.value[i]; |
|||
selectComponent.value[i] = []; |
|||
selectValue.value[i] = []; |
|||
if (item.conditionInfoList && item.conditionInfoList.length) { |
|||
for (let j = 0; j < item.conditionInfoList.length; j++) { |
|||
const jtem = item.conditionInfoList[j]; |
|||
let select; |
|||
select = SelectType[parseInt(processInfo.value.processSubType)].filter((se, t) => { |
|||
if (se.value == jtem.checkbox) { |
|||
selectValue.value[i][t] = true; |
|||
return se; |
|||
} |
|||
})[0]; |
|||
selectComponent.value[i].push(select); |
|||
groupList.value[i].conditionInfoList[j] = jtem; |
|||
} |
|||
} |
|||
} |
|||
if (groupList.value.length) { |
|||
let flag = false; |
|||
if (groupList.value.length > 0) flag = true; |
|||
for (let i = 0; i < groupList.value.length; i++) { |
|||
const item = groupList.value[i]; |
|||
if (!item.conditionInfoList?.length) flag = false; |
|||
for (let j = 0; j < item.conditionInfoList.length; j++) { |
|||
const jtem = item.conditionInfoList[j]; |
|||
if (!jtem.paramKey) flag = false; |
|||
if (!jtem.value || !jtem.value.length) flag = false; |
|||
} |
|||
} |
|||
if (flag) emit('validator', true); |
|||
else emit('validator', false); |
|||
} |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
|
|||
watch( |
|||
() => groupList.value, |
|||
(val) => { |
|||
emit('change', val); |
|||
let flag = false; |
|||
if (val.length > 0) flag = true; |
|||
for (let i = 0; i < val.length; i++) { |
|||
const item = val[i]; |
|||
if (!item.conditionInfoList?.length) flag = false; |
|||
for (let j = 0; j < item.conditionInfoList.length; j++) { |
|||
const jtem = item.conditionInfoList[j]; |
|||
if (!jtem.paramKey) flag = false; |
|||
if (!jtem.value || !jtem.value.length) flag = false; |
|||
} |
|||
} |
|||
if (flag) emit('validator', true); |
|||
else emit('validator', false); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
return { |
|||
groupList, |
|||
selectComponent, |
|||
SelectType, |
|||
processInfo, |
|||
selectValue, |
|||
addGroup, |
|||
deleteGroup, |
|||
change, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="less" scoped> |
|||
.group { |
|||
.header { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
margin-bottom: 19px; |
|||
} |
|||
.list { |
|||
width: 100%; |
|||
.header { |
|||
width: 100%; |
|||
height: 40px; |
|||
background: rgba(0, 0, 0, 0.02); |
|||
padding: 0 16px; |
|||
font-family: 'PingFang'; |
|||
font-style: normal; |
|||
font-weight: 500; |
|||
font-size: 16px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
.title { |
|||
flex: 1; |
|||
} |
|||
.group_check { |
|||
flex: 5; |
|||
} |
|||
} |
|||
.and { |
|||
margin: 0 0 16px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-size: 16px; |
|||
font-weight: 500; |
|||
} |
|||
.or { |
|||
margin: 24px 0; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-size: 16px; |
|||
font-weight: 500; |
|||
} |
|||
} |
|||
} |
|||
.error { |
|||
color: #ff4d4f; |
|||
} |
|||
</style> |
@ -1,71 +0,0 @@ |
|||
<template> |
|||
<div class="faqiren"> |
|||
<ns-form :model="data" :schemas="formSchema" /> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { nextTick, ref, watch } from 'vue'; |
|||
const emits = defineEmits(['update:modelValue', 'change']); |
|||
const props = defineProps({ |
|||
modelValue: { |
|||
type: Object, |
|||
}, |
|||
}); |
|||
let data = ref({ |
|||
compareType: 'in', |
|||
numberAfterCompareType: false, |
|||
paramKey: 'personStatus', |
|||
value: [], |
|||
valueType: 'number', |
|||
checkbox: 'personStatus', |
|||
dotDesc: null, |
|||
}); |
|||
emits('update:modelValue', data.value); |
|||
if (props.modelValue) { |
|||
if (props.modelValue.checkbox == 'personStatus') { |
|||
data.value = props.modelValue; |
|||
data.value.personStatus = props.modelValue.value; |
|||
emits('update:modelValue', data.value); |
|||
} |
|||
} |
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'personStatus', |
|||
component: 'NsSelect', |
|||
label: '岗位状态', |
|||
componentProps: { |
|||
placeholder: '请选择', |
|||
options: [ |
|||
{ |
|||
label: '试用', |
|||
value: 0, |
|||
}, |
|||
{ |
|||
label: '实习', |
|||
value: 1, |
|||
}, |
|||
{ |
|||
label: '正式', |
|||
value: 2, |
|||
}, |
|||
], |
|||
mode: 'multiple', |
|||
onChange: (v, o) => { |
|||
if (o && o.length > 1) o.splice(0, 1); |
|||
if (v && v.length > 1) v.splice(0, 1); |
|||
|
|||
data.value.dotDesc = o.length ? `岗位状态为${o[0].label}` : null; |
|||
data.value.value = v; |
|||
}, |
|||
}, |
|||
}, |
|||
]); |
|||
watch( |
|||
() => data.value, |
|||
(val) => { |
|||
emits('update:modelValue', val); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,62 +0,0 @@ |
|||
<template> |
|||
<div class="faqiren"> |
|||
<ns-form :model="data" :schemas="formSchema" /> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { computed, ref, watch } from 'vue'; |
|||
import { useStore } from '/@/stores/index'; |
|||
const emits = defineEmits(['update:modelValue', 'change']); |
|||
let store = useStore(); |
|||
let { setQuitReason } = store; |
|||
const props = defineProps({ |
|||
modelValue: { |
|||
type: Object, |
|||
}, |
|||
}); |
|||
let data = ref({ |
|||
compareType: 'in', |
|||
numberAfterCompareType: false, |
|||
paramKey: 'quitReason', |
|||
value: [], |
|||
valueType: 'number', |
|||
checkbox: 'quitReason', |
|||
dotDesc: null, |
|||
}); |
|||
emits('update:modelValue', data.value); |
|||
if (props.modelValue) { |
|||
if (props.modelValue.checkbox == 'quitReason') { |
|||
data.value = props.modelValue; |
|||
data.value.quitReason = props.modelValue.value; |
|||
emits('update:modelValue', data.value); |
|||
} |
|||
} |
|||
let reason = computed(() => store.quitReason); |
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'quitReason', |
|||
component: 'NsSelect', |
|||
label: '离职原因', |
|||
componentProps: { |
|||
placeholder: '请选择', |
|||
options: reason, |
|||
mode: 'multiple', |
|||
onChange: (v, o) => { |
|||
if (o && o.length > 1) o.splice(0, 1); |
|||
if (v && v.length > 1) v.splice(0, 1); |
|||
|
|||
data.value.dotDesc = o.length ? `离职类型为${o[0].label}` : null; |
|||
data.value.value = v; |
|||
}, |
|||
}, |
|||
}, |
|||
]); |
|||
watch( |
|||
() => data.value, |
|||
(val) => { |
|||
emits('update:modelValue', val); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,73 +0,0 @@ |
|||
<template> |
|||
<div class="faqiren"> |
|||
<ns-form :model="data" :schemas="formSchema" /> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { nextTick, ref, watch } from 'vue'; |
|||
import { useStore } from '/@/stores/index'; |
|||
const emits = defineEmits(['update:modelValue', 'change']); |
|||
let store = useStore(); |
|||
let { setQuitReason } = store; |
|||
const props = defineProps({ |
|||
modelValue: { |
|||
type: Object, |
|||
}, |
|||
}); |
|||
let data = ref({ |
|||
compareType: 'in', |
|||
numberAfterCompareType: false, |
|||
paramKey: 'quitType', |
|||
value: [], |
|||
valueType: 'number', |
|||
checkbox: 'quitType', |
|||
dotDesc: null, |
|||
}); |
|||
emits('update:modelValue', data.value); |
|||
if (props.modelValue) { |
|||
if (props.modelValue.checkbox == 'quitType') { |
|||
data.value = props.modelValue; |
|||
data.value.quitType = props.modelValue.value; |
|||
setQuitReason(props.modelValue.value[0]); |
|||
emits('update:modelValue', data.value); |
|||
} |
|||
} |
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'quitType', |
|||
component: 'NsSelect', |
|||
label: '离职类型', |
|||
componentProps: { |
|||
placeholder: '请选择', |
|||
options: [ |
|||
{ |
|||
label: '主动原因', |
|||
value: 0, |
|||
}, |
|||
{ |
|||
label: '被动原因', |
|||
value: 1, |
|||
}, |
|||
], |
|||
mode: 'multiple', |
|||
onChange: (v, o) => { |
|||
if (o && o.length > 1) o.splice(0, 1); |
|||
if (v && v.length > 1) v.splice(0, 1); |
|||
|
|||
data.value.dotDesc = o.length ? `离职类型为${o[0].label}` : null; |
|||
data.value.value = v; |
|||
console.log(v); |
|||
setQuitReason(v[0]); |
|||
}, |
|||
}, |
|||
}, |
|||
]); |
|||
watch( |
|||
() => data.value, |
|||
(val) => { |
|||
emits('update:modelValue', val); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,73 +0,0 @@ |
|||
<template> |
|||
<div class="faqiren"> |
|||
<ns-form :model="data" :schemas="formSchema" /> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { emit } from 'process'; |
|||
import { nextTick, ref, watch } from 'vue'; |
|||
const emits = defineEmits(['update:modelValue', 'change']); |
|||
const props = defineProps({ |
|||
modelValue: { |
|||
type: Object, |
|||
}, |
|||
}); |
|||
let data = ref({ |
|||
compareType: 'in', |
|||
numberAfterCompareType: false, |
|||
paramKey: 'sex', |
|||
value: [], |
|||
valueType: 'number', |
|||
checkbox: 'sex', |
|||
dotDesc: null, |
|||
}); |
|||
emits('update:modelValue', data.value); |
|||
if (props.modelValue) { |
|||
console.log(props.modelValue); |
|||
if (props.modelValue.checkbox == 'sex') { |
|||
data.value = props.modelValue; |
|||
data.value.sex = props.modelValue.value; |
|||
emits('update:modelValue', data.value); |
|||
} |
|||
} |
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'sex', |
|||
label: '性别', |
|||
component: 'NsSelect', |
|||
componentProps: { |
|||
placeholder: '请选择', |
|||
onChange: (v, o) => { |
|||
if (o && o.length > 1) o.splice(0, 1); |
|||
if (v && v.length > 1) v.splice(0, 1); |
|||
|
|||
data.value.dotDesc = o.length ? `性别为${o[0].label}` : null; |
|||
data.value.value = v; |
|||
}, |
|||
mode: 'multiple', |
|||
options: [ |
|||
{ |
|||
label: '女', |
|||
value: 0, |
|||
}, |
|||
{ |
|||
label: '男', |
|||
value: 1, |
|||
}, |
|||
{ |
|||
label: '未知', |
|||
value: 2, |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
]); |
|||
watch( |
|||
() => data.value, |
|||
(val) => { |
|||
emits('update:modelValue', data.value); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,71 +0,0 @@ |
|||
<template> |
|||
<div class="faqiren"> |
|||
<ns-form :model="data" :schemas="formSchema" /> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
import { nextTick, ref, watch } from 'vue'; |
|||
import { useStore } from '/@/stores/index'; |
|||
const emits = defineEmits(['update:modelValue', 'change']); |
|||
let store = useStore(); |
|||
let { setQuitReason } = store; |
|||
const props = defineProps({ |
|||
modelValue: { |
|||
type: Object, |
|||
}, |
|||
}); |
|||
let data = ref({ |
|||
compareType: 'in', |
|||
numberAfterCompareType: false, |
|||
paramKey: 'workHandover', |
|||
value: [], |
|||
valueType: 'number', |
|||
checkbox: 'workHandover', |
|||
dotDesc: null, |
|||
}); |
|||
emits('update:modelValue', data.value); |
|||
if (props.modelValue) { |
|||
if (props.modelValue.checkbox == 'workHandover') { |
|||
data.value = props.modelValue; |
|||
data.value.workHandover = props.modelValue.value; |
|||
emits('update:modelValue', data.value); |
|||
} |
|||
} |
|||
const formSchema = ref([ |
|||
{ |
|||
field: 'workHandover', |
|||
component: 'NsSelect', |
|||
label: '是否需要工作交接人', |
|||
componentProps: { |
|||
placeholder: '请选择', |
|||
options: [ |
|||
{ |
|||
label: '否', |
|||
value: 0, |
|||
}, |
|||
{ |
|||
label: '是', |
|||
value: 1, |
|||
}, |
|||
], |
|||
mode: 'multiple', |
|||
onChange: (v, o) => { |
|||
if (o && o.length > 1) o.splice(0, 1); |
|||
if (v && v.length > 1) v.splice(0, 1); |
|||
|
|||
data.value.dotDesc = o.length ? `是否需要工作交接人为${o[0].label}` : null; |
|||
data.value.value = v; |
|||
setQuitReason(v[0]); |
|||
}, |
|||
}, |
|||
}, |
|||
]); |
|||
watch( |
|||
() => data.value, |
|||
(val) => { |
|||
emits('update:modelValue', val); |
|||
}, |
|||
{ deep: true }, |
|||
); |
|||
</script> |
|||
<style lang="less" scoped></style> |
Before Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.0 KiB |
@ -1,322 +0,0 @@ |
|||
<template> |
|||
<div class="node-wrap" v-if="nodeConfig.nodeType < 3"> |
|||
<div |
|||
v-if="nodeConfig.nodeType == 1" |
|||
:style="`background: ${bgColors[nodeConfig.nodeType]}`" |
|||
class="node-wrap-box-start"> |
|||
<div class="title-icon" :style="`background: ${bgColors[nodeConfig.nodeType]}`"> |
|||
<img src="./icon/start-icon.png" alt="" /> |
|||
</div> |
|||
{{ nodeConfig.name }} |
|||
</div> |
|||
<div v-else class="node-wrap-box" :class="isTried && nodeConfig.error ? 'active error' : ''"> |
|||
<div class="title" :style="`background: ${bgColors[nodeConfig.nodeType]}`"> |
|||
<div class="title-icon" :style="`background: ${bgColors[nodeConfig.nodeType]}`"> |
|||
<img src="./icon/node-icon.png" alt="" /> |
|||
</div> |
|||
<div class="editable-title">{{ nodeConfig.name }}</div> |
|||
<a class="anticon anticon-close close" @click="delNode" title="删除"> |
|||
<close-circle-filled style="font-size: 18px" /> |
|||
</a> |
|||
</div> |
|||
<div class="content" @click="setPerson"> |
|||
<div class="text"> |
|||
<span class="placeholder" v-if="!showText">请选择{{ defaultText }}</span> |
|||
{{ showText }} |
|||
</div> |
|||
<i class="anticon anticon-right arrow"></i> |
|||
</div> |
|||
<div class="error_tip" v-if="isTried && nodeConfig.error"> |
|||
<i class="anticon anticon-exclamation-circle"></i> |
|||
</div> |
|||
</div> |
|||
<addNode v-model:childNodeP="nodeConfig.next" /> |
|||
</div> |
|||
<div class="branch-wrap" v-if="nodeConfig.nodeType == 3"> |
|||
<div class="branch-box-wrap"> |
|||
<div class="branch-box"> |
|||
<button class="add-branch" @click="addTerm">添加条件</button> |
|||
<div class="col-box" v-for="(item, index) in nodeConfig.exclusive" :key="index"> |
|||
<div class="condition-node"> |
|||
<div class="condition-node-box"> |
|||
<div class="auto-judge" :class="isTried && item.error ? 'error active' : ''"> |
|||
<!-- <div class="sort-left" v-if="index != 0" @click="arrTransfer(index, -1)"><</div> --> |
|||
<div class="title-wrapper" :style="`background: ${bgColors[nodeConfig.nodeType]}`"> |
|||
<div class="title-icon" :style="`background: ${bgColors[nodeConfig.nodeType]}`"> |
|||
<img src="./icon/node-icon.png" alt="" /> |
|||
</div> |
|||
<div class="editable-title">{{ item.name }}</div> |
|||
<div class="priority-title">优先级{{ index + 1 }}</div> |
|||
<div class="priority-action" v-if="index < nodeConfig.exclusive.length - 1"> |
|||
<a |
|||
title="复制" |
|||
class="anticon anticon-close close" |
|||
style="margin-right: 8px" |
|||
@click="copyTerm(index, nodeConfig)"> |
|||
<diff-filled style="font-size: 18px" /> |
|||
</a> |
|||
<a title="删除" class="anticon anticon-close close" @click="delTerm(index)"> |
|||
<close-circle-filled style="font-size: 18px" /> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<!-- <div |
|||
class="sort-right" |
|||
v-if="index != nodeConfig.exclusive.length - 1" |
|||
@click="arrTransfer(index)" |
|||
>></div |
|||
> --> |
|||
<div |
|||
class="content" |
|||
@click="setPerson(index)" |
|||
v-if="index < nodeConfig.exclusive.length - 1"> |
|||
<div class="text"> |
|||
{{ $func.conditionStr(nodeConfig, index) }} |
|||
</div> |
|||
</div> |
|||
<div class="content" v-else> |
|||
<div class="text">其他条件进入此流程 </div> |
|||
</div> |
|||
|
|||
<div class="error_tip" v-if="isTried && item.error"> |
|||
<i class="anticon anticon-exclamation-circle"></i> |
|||
</div> |
|||
</div> |
|||
<addNode v-model:childNodeP="item.exclusiveBranchNode" /> |
|||
</div> |
|||
</div> |
|||
<nodeWrap v-if="item.exclusiveBranchNode" v-model:nodeConfig="item.exclusiveBranchNode" /> |
|||
<template v-if="index == 0"> |
|||
<div class="top-left-cover-line"></div> |
|||
<div class="bottom-left-cover-line"></div> |
|||
</template> |
|||
<template v-if="index == nodeConfig.exclusive.length - 1"> |
|||
<div class="top-right-cover-line"></div> |
|||
<div class="bottom-right-cover-line"></div> |
|||
</template> |
|||
</div> |
|||
</div> |
|||
<addNode v-model:childNodeP="nodeConfig.next" /> |
|||
</div> |
|||
</div> |
|||
<nodeWrap v-if="nodeConfig.next" v-model:nodeConfig="nodeConfig.next" /> |
|||
</template> |
|||
<script setup> |
|||
import { onMounted, ref, watch, getCurrentInstance, computed } from 'vue'; |
|||
import $func from '/@/utils/index'; |
|||
import { useStore } from '/@/stores/index'; |
|||
import { bgColors, placeholderList } from '/@/utils/const'; |
|||
import { CloseCircleFilled, DiffFilled } from '@ant-design/icons-vue'; |
|||
let _uid = getCurrentInstance().uid; |
|||
let props = defineProps({ |
|||
nodeConfig: { |
|||
type: Object, |
|||
default: () => ({}), |
|||
}, |
|||
flowPermission: { |
|||
type: Object, |
|||
default: () => [], |
|||
}, |
|||
}); |
|||
|
|||
let defaultText = computed(() => { |
|||
return placeholderList[props.nodeConfig.nodeType]; |
|||
}); |
|||
let showText = computed(() => { |
|||
if (props.nodeConfig.nodeType == 1) return $func.arrToStr(props.flowPermission) || '所有人'; |
|||
return $func.setApproverStr(props.nodeConfig); |
|||
}); |
|||
|
|||
let isInputList = ref([]); |
|||
let isInput = ref(false); |
|||
const resetConditionNodesErr = () => { |
|||
for (var i = 0; i < props.nodeConfig.exclusive.length; i++) { |
|||
props.nodeConfig.exclusive[i].error = |
|||
$func.conditionStr(props.nodeConfig, i) == '请设置条件' && |
|||
i != props.nodeConfig.exclusive.length - 1; |
|||
} |
|||
}; |
|||
onMounted(() => { |
|||
if (props.nodeConfig.nodeType == 2) { |
|||
props.nodeConfig.error = !$func.setApproverStr(props.nodeConfig); |
|||
} else if (props.nodeConfig.nodeType == 2) { |
|||
props.nodeConfig.error = !$func.copyerStr(props.nodeConfig); |
|||
} else if (props.nodeConfig.nodeType == 3) { |
|||
resetConditionNodesErr(); |
|||
} |
|||
}); |
|||
let emits = defineEmits(['update:flowPermission', 'update:nodeConfig']); |
|||
let store = useStore(); |
|||
let { setPromoter, setApprover, setCondition, setApproverConfig, setConditionsConfig } = store; |
|||
let isTried = computed(() => store.isTried); |
|||
let approverConfig1 = computed(() => store.approverConfig1); |
|||
let conditionsConfig1 = computed(() => store.conditionsConfig1); |
|||
|
|||
watch(approverConfig1, (approver) => { |
|||
if (approver.flag && approver.id === _uid) { |
|||
emits('update:nodeConfig', approver.value); |
|||
} |
|||
}); |
|||
watch(conditionsConfig1, (condition) => { |
|||
if (condition.flag && condition.id === _uid) { |
|||
emits('update:nodeConfig', condition.value); |
|||
} |
|||
}); |
|||
|
|||
const delNode = () => { |
|||
emits('update:nodeConfig', props.nodeConfig.next); |
|||
}; |
|||
const addTerm = () => { |
|||
let len = props.nodeConfig.exclusive.length; |
|||
console.log(len); |
|||
props.nodeConfig.exclusive.splice(len - 1, 0, { |
|||
name: '条件' + len, |
|||
jumpId: '', |
|||
conditionType: 2, |
|||
priorityLevel: len, |
|||
conditionGroupList: [], |
|||
conditionExpression: '', |
|||
exclusiveBranchNode: null, |
|||
}); |
|||
resetConditionNodesErr(); |
|||
emits('update:nodeConfig', props.nodeConfig); |
|||
}; |
|||
const delTerm = (index) => { |
|||
props.nodeConfig.exclusive.splice(index, 1); |
|||
props.nodeConfig.exclusive.map((item, index) => { |
|||
item.priorityLevel = index + 1; |
|||
}); |
|||
resetConditionNodesErr(); |
|||
emits('update:nodeConfig', props.nodeConfig); |
|||
if (props.nodeConfig.exclusive.length == 1) { |
|||
if (props.nodeConfig.next) { |
|||
if (props.nodeConfig.exclusive[0].next) { |
|||
reData(props.nodeConfig.exclusive[0].next, props.nodeConfig.next); |
|||
} else { |
|||
props.nodeConfig.exclusive[0].next = props.nodeConfig.next; |
|||
} |
|||
} |
|||
emits('update:nodeConfig', props.nodeConfig.exclusive[0].next); |
|||
} |
|||
}; |
|||
const copyTerm = (index, nodeConfig) => { |
|||
let config = nodeConfig.exclusive[index]; |
|||
let len = props.nodeConfig.exclusive.length; |
|||
config.priorityLevel = len; |
|||
props.nodeConfig.exclusive.splice(len - 1, 0, config); |
|||
resetConditionNodesErr(); |
|||
emits('update:nodeConfig', props.nodeConfig); |
|||
}; |
|||
const reData = (data, addData) => { |
|||
if (!data.next) { |
|||
data.next = addData; |
|||
} else { |
|||
reData(data.next, addData); |
|||
} |
|||
}; |
|||
const setPerson = (index) => { |
|||
var { nodeType } = props.nodeConfig; |
|||
if (nodeType == 1) { |
|||
setPromoter(true); |
|||
} else if (nodeType == 2) { |
|||
setApprover(true); |
|||
setApproverConfig({ |
|||
value: { |
|||
...JSON.parse(JSON.stringify(props.nodeConfig)), |
|||
}, |
|||
flag: false, |
|||
id: _uid, |
|||
}); |
|||
} else { |
|||
setCondition(true); |
|||
setConditionsConfig({ |
|||
value: JSON.parse(JSON.stringify(props.nodeConfig)), |
|||
priorityLevel: index + 1, |
|||
flag: false, |
|||
id: _uid, |
|||
}); |
|||
} |
|||
}; |
|||
const arrTransfer = (index, type = 1) => { |
|||
//向左-1,向右1 |
|||
props.nodeConfig.exclusive[index] = props.nodeConfig.exclusive.splice( |
|||
index + type, |
|||
1, |
|||
props.nodeConfig.exclusive[index], |
|||
)[0]; |
|||
props.nodeConfig.exclusive.map((item, index) => { |
|||
item.priorityLevel = index + 1; |
|||
}); |
|||
resetConditionNodesErr(); |
|||
emits('update:nodeConfig', props.nodeConfig); |
|||
}; |
|||
</script> |
|||
<style lang="less" scoped> |
|||
.anticon:before { |
|||
display: block; |
|||
font-family: anticon !important; |
|||
} |
|||
.error_tip { |
|||
position: absolute; |
|||
top: 0px; |
|||
right: 0px; |
|||
transform: translate(150%, 0px); |
|||
font-size: 24px; |
|||
} |
|||
|
|||
.promoter_person .el-dialog__body { |
|||
padding: 10px 20px 14px 20px; |
|||
} |
|||
|
|||
.selected_list { |
|||
margin-bottom: 20px; |
|||
line-height: 30px; |
|||
} |
|||
|
|||
.selected_list span { |
|||
margin-right: 10px; |
|||
padding: 3px 6px 3px 9px; |
|||
line-height: 12px; |
|||
white-space: nowrap; |
|||
border-radius: 2px; |
|||
border: 1px solid rgba(220, 220, 220, 1); |
|||
} |
|||
|
|||
.selected_list img { |
|||
margin-left: 5px; |
|||
width: 7px; |
|||
height: 7px; |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.node-wrap-box-start { |
|||
width: 272px; |
|||
height: 48px; |
|||
text-align: center; |
|||
color: #fff; |
|||
border-radius: 4px; |
|||
line-height: 52px; |
|||
position: relative; |
|||
font-size: 14px; |
|||
.title-icon { |
|||
width: 48px; |
|||
height: 48px; |
|||
border: 1px solid #ffffff; |
|||
border-radius: 50%; |
|||
position: absolute; |
|||
left: 50%; |
|||
transform: translateX(-50%); |
|||
top: -35px; |
|||
img { |
|||
width: 70%; |
|||
margin-top: 5px; |
|||
} |
|||
} |
|||
} |
|||
.node-wrap-box { |
|||
.editable-title { |
|||
width: 100%; |
|||
text-align: center; |
|||
} |
|||
} |
|||
</style> |
@ -1,87 +0,0 @@ |
|||
<template> |
|||
<ul class="select-box"> |
|||
<template v-for="(elem, i) in list" :key="i"> |
|||
<template v-if="elem.type === 'role'"> |
|||
<li |
|||
v-for="item in elem.data" |
|||
:key="item.roleId" |
|||
class="check_box" |
|||
:class="{ active: elem.isActive && elem.isActive(item), not: elem.not }" |
|||
@click="elem.change(item)"> |
|||
<a |
|||
:title="item.description" |
|||
:class="{ active: elem.isActiveItem && elem.isActiveItem(item) }"> |
|||
<img src="/@/assets/images/icon_role.png" />{{ item.roleName }} |
|||
</a> |
|||
</li> |
|||
</template> |
|||
<template v-if="elem.type === 'department'"> |
|||
<li |
|||
v-for="item in elem.data" |
|||
:key="item.id" |
|||
class="check_box" |
|||
:class="{ not: !elem.isDepartment }"> |
|||
<a |
|||
v-if="elem.isDepartment" |
|||
:class="elem.isActive(item) && 'active'" |
|||
@click="elem.change(item)"> |
|||
<img src="/@/assets/images/icon_file.png" />{{ item.departmentName }}</a |
|||
> |
|||
<a v-else><img src="/@/assets/images/icon_file.png" />{{ item.departmentName }}</a> |
|||
<i @click="elem.next(item)">下级</i> |
|||
</li> |
|||
</template> |
|||
<template v-if="elem.type === 'employee'"> |
|||
<li v-for="item in elem.data" :key="item.id" class="check_box"> |
|||
<a |
|||
:class="elem.isActive(item) && 'active'" |
|||
@click="elem.change(item)" |
|||
:title="item.departmentNames"> |
|||
<img src="/@/assets/images/icon_people.png" />{{ item.employeeName }} |
|||
</a> |
|||
</li> |
|||
</template> |
|||
</template> |
|||
</ul> |
|||
</template> |
|||
<script setup> |
|||
defineProps({ |
|||
list: { |
|||
type: Array, |
|||
default: () => [], |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="less"> |
|||
.select-box { |
|||
height: 420px; |
|||
overflow-y: auto; |
|||
|
|||
li { |
|||
padding: 5px 0; |
|||
|
|||
i { |
|||
float: right; |
|||
padding-left: 24px; |
|||
padding-right: 10px; |
|||
color: #3195f8; |
|||
font-size: 12px; |
|||
cursor: pointer; |
|||
background: url(~/@/assets/images/next_level_active.png) no-repeat 10px center; |
|||
border-left: 1px solid rgb(238, 238, 238); |
|||
} |
|||
|
|||
a.active + i { |
|||
color: rgb(197, 197, 197); |
|||
background-image: url(~/@/assets/images/next_level.png); |
|||
pointer-events: none; |
|||
} |
|||
|
|||
img { |
|||
width: 14px; |
|||
vertical-align: middle; |
|||
margin-right: 5px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,93 +0,0 @@ |
|||
<template> |
|||
<div class="select-result l"> |
|||
<p class="clear" |
|||
>已选({{ total }}) |
|||
<a @click="emits('del')">清空</a> |
|||
</p> |
|||
<ul> |
|||
<template v-for="{ type, data, cancel } in list" :key="type"> |
|||
<template v-if="type === 'role'"> |
|||
<li v-for="item in data" :key="item.roleId"> |
|||
<img src="/@/assets/images/icon_role.png" //> |
|||
<span>{{ item.roleName }}</span> |
|||
<img src="/@/assets/images/cancel.png" @click="cancel(item)" //> |
|||
</li> |
|||
</template> |
|||
<template v-if="type === 'department'"> |
|||
<li v-for="item in data" :key="item.id"> |
|||
<img src="/@/assets/images/icon_file.png" //> |
|||
<span>{{ item.departmentName }}</span> |
|||
<img src="/@/assets/images/cancel.png" @click="cancel(item)" //> |
|||
</li> |
|||
</template> |
|||
<template v-if="type === 'employee'"> |
|||
<li v-for="item in data" :key="item.id"> |
|||
<img src="/@/assets/images/icon_people.png" //> |
|||
<span>{{ item.employeeName }}</span> |
|||
<img src="/@/assets/images/cancel.png" @click="cancel(item)" //> |
|||
</li> |
|||
</template> |
|||
</template> |
|||
</ul> |
|||
</div> |
|||
</template> |
|||
<script setup> |
|||
defineProps({ |
|||
total: { |
|||
type: Number, |
|||
default: 0, |
|||
}, |
|||
list: { |
|||
type: Array, |
|||
default: () => [{ type: 'role', data, cancel }], |
|||
}, |
|||
}); |
|||
let emits = defineEmits(['del']); |
|||
</script> |
|||
|
|||
<style lang="less"> |
|||
.select-result { |
|||
width: 276px; |
|||
height: 100%; |
|||
font-size: 12px; |
|||
|
|||
ul { |
|||
height: 460px; |
|||
overflow-y: auto; |
|||
|
|||
li { |
|||
margin: 11px 26px 13px 19px; |
|||
line-height: 17px; |
|||
|
|||
span { |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
img { |
|||
&:first-of-type { |
|||
width: 14px; |
|||
vertical-align: middle; |
|||
margin-right: 5px; |
|||
} |
|||
|
|||
&:last-of-type { |
|||
float: right; |
|||
margin-top: 2px; |
|||
width: 14px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
p { |
|||
padding-left: 19px; |
|||
padding-right: 20px; |
|||
line-height: 37px; |
|||
border-bottom: 1px solid #f2f2f2; |
|||
|
|||
a { |
|||
float: right; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,90 +0,0 @@ |
|||
/** @format */ |
|||
import { dateUtil } from '/nerv-lib/util/date-util'; |
|||
|
|||
export const appConfig = { |
|||
projectType: 'web', |
|||
baseApi: '/api', |
|||
enablePermissions: true, |
|||
baseHeader: '/home', |
|||
baseRouter: '/home/index', |
|||
timeout: 30 * 1000, |
|||
userLoginApi: '/api/op/objs/Login', |
|||
userInfoApi: '/api/op/objs/CurrentUser', |
|||
userResourceApi: '/api/op/objs/User/Resource', |
|||
useHistoryTag: false, |
|||
customLogin: () => import('/@/view/login.vue'), |
|||
updatePassWordInfo: { |
|||
title: '修改密码', |
|||
subtitle: '智慧园区平台', |
|||
api: '/api/op/objs/User/changePassword', |
|||
}, |
|||
resourceInfo: { |
|||
application: { |
|||
version: '1.0.35', |
|||
label: '智慧园区', |
|||
dataScope: { |
|||
scopeMode: 2, |
|||
scopeType: 'dept', |
|||
dataTips: '', |
|||
dataConfig: { |
|||
dept: { |
|||
scopeType: 'dept', |
|||
scopeMap: { |
|||
'1': { |
|||
scopeKey: '1', |
|||
title: '全部', |
|||
score: 0, |
|||
keyType: 'int', |
|||
}, |
|||
'2': { |
|||
scopeKey: '2', |
|||
title: '自己', |
|||
score: 4, |
|||
keyType: 'int', |
|||
}, |
|||
'3': { |
|||
scopeKey: '3', |
|||
title: '本部门', |
|||
score: 2, |
|||
keyType: 'int', |
|||
}, |
|||
'4': { |
|||
scopeKey: '4', |
|||
title: '本部门及其下属部门', |
|||
score: 1, |
|||
keyType: 'int', |
|||
}, |
|||
'5': { |
|||
scopeKey: '5', |
|||
title: '自选部门', |
|||
score: 3, |
|||
type: 1, |
|||
tips: '选择部门:互斥,父亲本部门及其下属部门,那这里只能选择这几个部门,如果父亲是本部门,只能', |
|||
keyType: 'int', |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
api: '/qa/Operation/Resources/Op/init', |
|||
token: `${dateUtil().format('YYYYMMDD')}pensionwebui`, |
|||
dealReosurceList: (RouteMouleList: any) => { |
|||
if (Object.prototype.toString.call(RouteMouleList) === '[object Array]') { |
|||
RouteMouleList.forEach((item: any) => { |
|||
if (item.code === 'AssetManagementInfo') { |
|||
item.codeDataScope = { |
|||
status: 1, |
|||
scopeType: 'dept', |
|||
dataTips: '', |
|||
scopeList: [1, 3, 4, 5], |
|||
}; |
|||
} |
|||
}); |
|||
return RouteMouleList; |
|||
} else { |
|||
return []; |
|||
} |
|||
}, |
|||
}, |
|||
}; |
@ -1,2 +0,0 @@ |
|||
import { appConfig } from '/@/config/app.config'; |
|||
export { appConfig }; |
@ -1,22 +0,0 @@ |
|||
export enum ResultEnum { |
|||
SUCCESS = 0, |
|||
ERROR = 1, |
|||
TIMEOUT = 401, |
|||
TOKEN_INVALID = 403, |
|||
} |
|||
|
|||
export enum RequestEnum { |
|||
GET = 'GET', |
|||
POST = 'POST', |
|||
PUT = 'PUT', |
|||
DELETE = 'DELETE', |
|||
} |
|||
|
|||
export enum ContentTypeEnum { |
|||
// json
|
|||
JSON = 'application/json;charset=UTF-8', |
|||
// form-data qs
|
|||
FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8', |
|||
// form-data upload
|
|||
FORM_DATA = 'multipart/form-data;charset=UTF-8', |
|||
} |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.2 KiB |
@ -1,34 +0,0 @@ |
|||
import { createApp } from 'vue'; |
|||
import App from '/@/App.vue'; |
|||
import { saasInit } from '/nerv-lib/saas'; |
|||
import { apiModule } from '/@/api'; |
|||
import { appConfig } from '/@/config'; |
|||
|
|||
const app = createApp(App); |
|||
saasInit({ |
|||
app, |
|||
apiModule, |
|||
appConfig, |
|||
}); |
|||
import nodeWrap from '/@/components/nodeWrap.vue'; |
|||
app.component('NodeWrap', nodeWrap); //初始化组件
|
|||
import addNode from '/@/components/addNode.vue'; |
|||
app.component('AddNode', addNode); //初始化组件
|
|||
|
|||
app.directive('focus', { |
|||
mounted(el) { |
|||
el.focus(); |
|||
}, |
|||
}); |
|||
|
|||
app.directive('enterNumber', { |
|||
mounted(el, { value = 100 }, vnode) { |
|||
el = el.nodeName == 'INPUT' ? el : el.children[0]; |
|||
const RegStr = value == 0 ? `^[\\+\\-]?\\d+\\d{0,0}` : `^[\\+\\-]?\\d+\\.?\\d{0,${value}}`; |
|||
el.addEventListener('input', function () { |
|||
el.value = el.value.match(new RegExp(RegStr, 'g')); |
|||
el.dispatchEvent(new Event('input')); |
|||
}); |
|||
}, |
|||
}); |
|||
app.mount('#app'); |
@ -1,11 +0,0 @@ |
|||
/** @format */ |
|||
|
|||
const RootRoute = { |
|||
path: '/', |
|||
name: 'root', |
|||
redirect: { name: 'MessageTemplate' }, |
|||
meta: { |
|||
title: 'Root', |
|||
}, |
|||
}; |
|||
export default RootRoute; |
@ -1,943 +0,0 @@ |
|||
/** @format */ |
|||
|
|||
const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue'); |
|||
const basicData = { |
|||
path: '/systemSettingManage', |
|||
name: 'systemSettingManage', |
|||
meta: { title: '系统设置', icon: 'doorway', index: 10 }, |
|||
redirect: { name: 'UserIndex' }, |
|||
children: [ |
|||
{ |
|||
path: 'menuManage', |
|||
name: 'menuManage', |
|||
meta: { title: '菜单管理', hideResource: true, icon: 'caidanguanli', hideChildren: true }, |
|||
component: Base, |
|||
redirect: { name: 'menuManageIndex' }, |
|||
children: [ |
|||
{ |
|||
path: 'index', |
|||
name: 'menuManageIndex', |
|||
component: () => import('/nerv-lib/saas/view/menuManage/index.vue'), |
|||
meta: { title: '菜单管理', keepAlive: true }, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
path: 'user', |
|||
name: 'User', |
|||
meta: { title: '用户管理', icon: 'yonghuguanli', hideChildren: true }, |
|||
redirect: { name: 'UserIndex' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'index', |
|||
name: 'UserIndex', |
|||
component: () => import('/@/view/userManage/userList/index.vue'), |
|||
meta: { |
|||
title: '用户管理', |
|||
keepAlive: true, |
|||
operates: [ |
|||
{ |
|||
title: '重置密码', |
|||
code: 'UserReset', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/person/reset', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
title: '删除', |
|||
code: 'UserRemove', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/person/delete', |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/person/pageList', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'add', |
|||
name: 'UserAdd', |
|||
meta: { |
|||
type: 'op', |
|||
title: '新增', |
|||
backApi: [ |
|||
{ method: 'POST', url: '/api/objs/person/add' }, |
|||
{ method: 'GET', url: '/api/objs/person/detail' }, |
|||
{ method: 'GET', url: '/api/objs/admin/DictItem' }, |
|||
{ method: 'GET', url: '/api/objs/Department' }, |
|||
{ method: 'GET', url: '/api/objs/admin/BaseArea' }, |
|||
{ method: 'POST', url: '/api/objs/admin/MaterialFile' }, |
|||
], |
|||
}, |
|||
component: () => import('/@/view/userManage/userList/add.vue'), |
|||
}, |
|||
{ |
|||
path: 'edit', |
|||
name: 'UserEdit', |
|||
meta: { |
|||
type: 'op', |
|||
title: '编辑', |
|||
backApi: [ |
|||
{ method: 'POST', url: '/api/objs/person/update' }, |
|||
{ method: 'GET', url: '/api/objs/person/detail' }, |
|||
{ method: 'GET', url: '/api/objs/admin/DictItem' }, |
|||
{ method: 'GET', url: '/api/objs/Department' }, |
|||
{ method: 'GET', url: '/api/objs/admin/BaseArea' }, |
|||
{ method: 'POST', url: '/api/objs/admin/MaterialFile' }, |
|||
], |
|||
}, |
|||
component: () => import('/@/view/userManage/userList/edit.vue'), |
|||
}, |
|||
{ |
|||
path: 'detail', |
|||
name: 'UserDetail', |
|||
meta: { |
|||
type: 'op', |
|||
title: '详情', |
|||
backApi: [{ method: 'GET', url: '/api/objs/person/detail' }], |
|||
}, |
|||
component: () => import('/@/view/userManage/userList/detail.vue'), |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
path: 'roleType', |
|||
name: 'RoleType', |
|||
meta: { title: '角色管理', icon: 'jueseguanli', hideChildren: true }, |
|||
redirect: { name: 'RoleTypeIndex' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'index', |
|||
name: 'RoleTypeIndex', |
|||
component: () => import('/@/view/userManage/roleType/index.vue'), |
|||
meta: { |
|||
title: '角色管理', |
|||
keepAlive: true, |
|||
operates: [ |
|||
{ |
|||
title: '删除', |
|||
code: 'RoleTypeRemove', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/Role/delete', |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/Role', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'add', |
|||
meta: { |
|||
type: 'op', |
|||
title: '新增', |
|||
backApi: [ |
|||
{ method: 'POST', url: '/api/objs/Role' }, |
|||
{ method: 'POST', url: '/api/objs/Role/update' }, |
|||
{ method: 'GET', url: '/api/objs/Role/detail' }, |
|||
{ method: 'GET', url: '/api/objs/Role/ResourcesMap' }, |
|||
{ method: 'GET', url: '/api/objs/AppResourcesAllList' }, |
|||
], |
|||
}, |
|||
name: 'RoleTypeAdd', |
|||
component: () => import('/@/view/userManage/roleType/addOrEdit.vue'), |
|||
}, |
|||
{ |
|||
path: 'edit', |
|||
meta: { |
|||
type: 'op', |
|||
title: '编辑', |
|||
backApi: [ |
|||
{ method: 'POST', url: '/api/objs/Role' }, |
|||
{ method: 'POST', url: '/api/objs/Role/update' }, |
|||
{ method: 'GET', url: '/api/objs/Role/detail' }, |
|||
{ method: 'GET', url: '/api/objs/Role/ResourcesMap' }, |
|||
{ method: 'GET', url: '/api/objs/AppResourcesAllList' }, |
|||
], |
|||
}, |
|||
name: 'RoleTypeEdit', |
|||
component: () => import('/@/view/userManage/roleType/addOrEdit.vue'), |
|||
}, |
|||
{ |
|||
path: 'setRolePerson', |
|||
meta: { |
|||
type: 'op', |
|||
title: '人员设置', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/Role/Account', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/Role/detail', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/Role/Account', |
|||
}, |
|||
], |
|||
}, |
|||
name: 'SetRolePerson', |
|||
component: () => import('/@/view/userManage/roleType/setRolePerson.vue'), |
|||
}, |
|||
], |
|||
}, |
|||
|
|||
{ |
|||
path: '/organManagement', |
|||
name: 'organManagement', |
|||
meta: { title: '机构管理', icon: 'jigouguanli' }, |
|||
redirect: { name: 'OperationManagement' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'organAccount', |
|||
name: 'OrganAccount', |
|||
meta: { title: '机构账号', hideChildren: true }, |
|||
redirect: { name: 'OrganAccountIndex' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'index', |
|||
name: 'OrganAccountIndex', |
|||
component: () => import('/@/view/organManagement-op/organAccount/index.vue'), |
|||
meta: { |
|||
title: '机构列表', |
|||
keepAlive: true, |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/tenant/operator/pageList', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/tenant/disable', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/tenant/resetPassword', |
|||
}, |
|||
], |
|||
operates: [ |
|||
{ |
|||
title: '批量导出', |
|||
code: 'exports', |
|||
}, |
|||
{ |
|||
title: '重置密码', |
|||
code: 'resetPassword', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'add', |
|||
name: 'OrganAccountAdd', |
|||
component: () => import('/@/view/organManagement-op/organAccount/add.vue'), |
|||
meta: { |
|||
title: '新增', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/tenant/operator/detail', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/bg/institution/pageList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/ResCollType/typeList', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/community/tenant/add', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/community/tenant/update', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'edit', |
|||
name: 'OrganAccountEdit', |
|||
component: () => import('/@/view/organManagement-op/organAccount/edit.vue'), |
|||
meta: { |
|||
title: '编辑', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/tenant/operator/detail', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/bg/institution/pageList', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/pension/tenant/add', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/ResCollType/typeList', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/community/tenant/update', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'config', |
|||
name: 'OrganAccountConfig', |
|||
component: () => import('/@/view/organManagement-op/organAccount/config.vue'), |
|||
meta: { |
|||
title: '配置项', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/common/tenant/orgConfigTemplateList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/productType/selectTenant', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/v2/tenant/config/orgConfigTemplateList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/common/tenant/hadProduct', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/productType/select', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/common/tenant/hadAlarmGrade', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/tenant/config/orgConfig', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/common/tenant/initPension', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'batchConfig', |
|||
name: 'OrganAccountBatchConfig', |
|||
component: () => import('/@/view/organManagement-op/organAccount/batchConfig.vue'), |
|||
meta: { |
|||
title: '批量配置', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/common/tenant/orgConfigTemplateList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/v2/tenant/config/orgConfigTemplateList', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/tenant/config/orgConfig', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/common/tenant/initPension', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
path: 'organType', |
|||
name: 'OrganType', |
|||
meta: { title: '机构类型', hideChildren: true }, |
|||
redirect: { name: 'OrganTypeIndex' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'index', |
|||
name: 'OrganTypeIndex', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/organType/index.vue'), |
|||
meta: { |
|||
title: '机构类型', |
|||
keepAlive: true, |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/ResCollType/page', |
|||
}, |
|||
], |
|||
operates: [ |
|||
{ |
|||
title: '编辑备注', |
|||
code: 'OrganTypeEditDec', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/ResCollType/update', |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'appListUnderOranType', |
|||
name: 'AppListUnderOranType', |
|||
component: () => |
|||
import('/nerv-lib/saas/view/commonMoudule/organType/appListUnderOranType.vue'), |
|||
meta: { |
|||
title: '应用管理', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/CollTypeResource/Application', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'permissionSet', |
|||
name: 'PermissionSet', |
|||
component: () => |
|||
import('/nerv-lib/saas/view/commonMoudule/organType/permissionSet.vue'), |
|||
meta: { |
|||
title: '追加权限', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/ResCollResource', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/Resources/AllList', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/ResCollResource/save', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'menusSort', |
|||
name: 'MenusTree', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/organType/menusTree.vue'), |
|||
meta: { |
|||
title: '调整布局', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/CollTypeResource/MenuTree', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/CollTypeResource/Sort', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'menusEdit', |
|||
name: 'MenusEdit', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/organType/menusEdit.vue'), |
|||
meta: { |
|||
title: '修改菜单', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/CollTypeResource/MenuTree', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/CollTypeResource/Update', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/CollTypeResource/Add', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/CollTypeResource/Offline', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'config', |
|||
name: 'OrganTypeConfig', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/organType/config.vue'), |
|||
meta: { |
|||
title: '配置项', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/authorityType/queryAuthorityDataListByTenantType', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/productType/selectOrganizationType', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/v2/tenant/config/OrgTypePageListInit', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/common/orgType/allAlarmRule', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/common/orgType/hadAlarmRule', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/common/orgType/hadProduct', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/common/orgType/hadAlarmGrade', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/productType/select', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/tenant/initPension', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/v2/tenant/config/OrgTypePageListInit', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/workOrder/queryWorkOrderTypeDataByTenantType', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/workOrder/queryWorkOrderTypePage', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/v2/ResCollType/config/orgConfigTemplateList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/v2/tenant/config/orgConfigTemplateList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/authorityType/querySetAuthorityDataPublicList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/ResCollType/config/orgConfigTemplateList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/processTemplate/getTypeByOrg', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/processTemplate/pageList', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/tenant/config/orgTypeConfig', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/v2/tenant/config/orgTypeConfigInit', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'themeConfig', |
|||
name: 'OrganTypeThemeConfig', |
|||
component: () => |
|||
import('/nerv-lib/saas/view/commonMoudule/organType/themeConfig.vue'), |
|||
meta: { |
|||
title: '主题配置', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/sysTheme/orgType/update', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/User/themeConfig', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/sysTheme/orgType/detail', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
path: 'appManage', |
|||
name: 'AppManage', |
|||
meta: { title: '应用管理', hideChildren: true, icon: 'caidanguanli' }, |
|||
redirect: { name: 'AppManageIndex' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'appList', |
|||
name: 'AppManageIndex', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/organType/appList.vue'), |
|||
// component: () => import('/@/view/organManagement-op/organType/appList.vue'),
|
|||
meta: { |
|||
title: '应用管理', |
|||
icon: 'doorway', |
|||
keepAlive: true, |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/ProjectManagerInfo', |
|||
}, |
|||
], |
|||
operates: [ |
|||
{ |
|||
title: '清理版本', |
|||
code: 'VersionClear', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/ResourceMagVersionClear', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
title: '编辑备注', |
|||
code: 'VersionDescribeUpdate', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/ResourceMagVersion/update', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
title: '导出JSON', |
|||
code: 'VersionExport', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/ResourceMagVersionComplete', |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'versionLoad', |
|||
name: 'VersionLoad', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/organType/versionLoad.vue'), |
|||
//component: () => import('/@/view/organManagement-op/organType/versionLoad.vue'),
|
|||
meta: { |
|||
title: '导入应用', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/ResourceMagVersionComplete', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'versionList', |
|||
name: 'VersionList', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/organType/versionList.vue'), |
|||
meta: { |
|||
title: '版本管理', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/ResourceMagVersion', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
|
|||
{ |
|||
path: 'menuTreeDetail', |
|||
name: 'MenuTreeDetail', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/organType/menuTreeDetail.vue'), |
|||
meta: { |
|||
title: '查看功能树', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/ResourceMagVersion', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
path: 'screenOperate', |
|||
name: 'ScreenOperate', |
|||
meta: { title: '大屏运维', hideChildren: true, icon: 'caidanguanli' }, |
|||
redirect: { name: 'ScreenOperateIndex' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'index', |
|||
name: 'ScreenOperateIndex', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/screenOperate/index.vue'), |
|||
meta: { |
|||
title: '大屏运维', |
|||
icon: 'doorway', |
|||
keepAlive: true, |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/DatavManage/list', |
|||
}, |
|||
], |
|||
operates: [ |
|||
{ |
|||
title: '导入接口', |
|||
code: 'ScreenImportApi', |
|||
backApi: [ |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/DatavManage/saveBackApi', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
title: '导出接口', |
|||
code: 'ScreenExportApi', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/DatavManage/detail', |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'screenOperateEdit', |
|||
name: 'ScreenOperateEdit', |
|||
component: () => |
|||
import('/nerv-lib/saas/view/commonMoudule/screenOperate/screenOperateEdit.vue'), |
|||
meta: { |
|||
title: '编辑大屏', |
|||
icon: 'doorway', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/DatavManage/detail', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/DatavManage/editInfo', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/MaterialFile', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'authorize', |
|||
name: 'ScreenOperateAuthorize', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/screenOperate/authorize.vue'), |
|||
meta: { |
|||
title: '授权机构', |
|||
icon: 'doorway', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/DatavManage/detail', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/DatavManage/organizeList', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/DatavManage/authOrganize', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
path: 'bigDataScreen', |
|||
name: 'BigDataScreen', |
|||
meta: { title: '数据大屏', hideChildren: true, icon: 'caidanguanli' }, |
|||
redirect: { name: 'BigDataScreenIndex' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'index', |
|||
name: 'BigDataScreenIndex', |
|||
component: () => import('/nerv-lib/saas/view/commonMoudule/bigDataScreen/index.vue'), |
|||
meta: { |
|||
title: '数据大屏', |
|||
icon: 'doorway', |
|||
keepAlive: true, |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/ProjectManagerInfo', |
|||
}, |
|||
], |
|||
operates: [ |
|||
{ |
|||
title: '分享链接', |
|||
code: 'shareLink', |
|||
backApi: [ |
|||
{ method: 'POST', url: '/api/objs/Datav/share' }, |
|||
{ method: 'POST', url: '/api/objs/Datav/shareCancel' }, |
|||
{ method: 'GET', url: '/api/objs/Datav/shareList' }, |
|||
], |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
path: 'administrativeDivision-op', |
|||
name: 'AdministrativeDivision', |
|||
meta: { title: '行政区域', hideChildren: true, icon: 'caidanguanli' }, |
|||
redirect: { name: 'AdministrativeDivisionIndex' }, |
|||
component: Base, |
|||
children: [ |
|||
{ |
|||
path: 'index', |
|||
name: 'AdministrativeDivisionIndex', |
|||
component: () => |
|||
import('/nerv-lib/saas/view/commonMoudule/administrativeDivision/index.vue'), |
|||
meta: { |
|||
title: '行政区域', |
|||
keepAlive: true, |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/area/listByParentCode', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/area/pageList', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/op/objs/Role/Account', |
|||
}, |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/area/areaTree', |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
path: 'add', |
|||
name: 'AdministrativeDivisionAdd', |
|||
meta: { |
|||
title: '新增', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/area/listByParentCode', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/area/add', |
|||
}, |
|||
], |
|||
}, |
|||
component: () => |
|||
import('/nerv-lib/saas/view/commonMoudule/administrativeDivision/add.vue'), |
|||
}, |
|||
{ |
|||
path: 'edit', |
|||
name: 'AdministrativeDivisionEdit', |
|||
meta: { |
|||
title: '编辑', |
|||
type: 'op', |
|||
backApi: [ |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/objs/admin/area/detail', |
|||
}, |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/objs/admin/area/update', |
|||
}, |
|||
], |
|||
}, |
|||
component: () => |
|||
import('/nerv-lib/saas/view/commonMoudule/administrativeDivision/edit.vue'), |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
}; |
|||
export default basicData; |
@ -1,12 +0,0 @@ |
|||
import { defineStore } from 'pinia'; |
|||
|
|||
export const items = defineStore({ |
|||
id: 'items', |
|||
state() { |
|||
return { list: [], count: 10 }; |
|||
}, |
|||
getters: { |
|||
double: (state: any) => state.count * 2, |
|||
}, |
|||
actions: {}, |
|||
}); |
@ -1,97 +0,0 @@ |
|||
import { defineStore } from 'pinia'; |
|||
|
|||
export const useStore = defineStore('store', { |
|||
state: () => ({ |
|||
tableId: '', |
|||
isTried: false, |
|||
promoterDrawer: false, |
|||
flowPermission1: {}, |
|||
approverDrawer: false, |
|||
approverConfig1: {}, |
|||
copyerDrawer: false, |
|||
copyerConfig1: {}, |
|||
conditionDrawer: false, |
|||
conditionsConfig1: { |
|||
conditionNodes: [], |
|||
}, |
|||
quitReason: [], |
|||
}), |
|||
actions: { |
|||
setTableId(payload) { |
|||
this.tableId = payload; |
|||
}, |
|||
setIsTried(payload) { |
|||
this.isTried = payload; |
|||
}, |
|||
setPromoter(payload) { |
|||
this.promoterDrawer = payload; |
|||
}, |
|||
setFlowPermission(payload) { |
|||
this.flowPermission1 = payload; |
|||
}, |
|||
setApprover(payload) { |
|||
this.approverDrawer = payload; |
|||
}, |
|||
setApproverConfig(payload) { |
|||
this.approverConfig1 = payload; |
|||
}, |
|||
setCopyer(payload) { |
|||
this.copyerDrawer = payload; |
|||
}, |
|||
setCopyerConfig(payload) { |
|||
this.copyerConfig1 = payload; |
|||
}, |
|||
setCondition(payload) { |
|||
this.conditionDrawer = payload; |
|||
}, |
|||
setConditionsConfig(payload) { |
|||
this.conditionsConfig1 = payload; |
|||
}, |
|||
setQuitReason(quitType) { |
|||
if (quitType == 0) { |
|||
this.quitReason = [ |
|||
{ |
|||
label: '个人原因', |
|||
value: 0, |
|||
}, |
|||
{ |
|||
label: '家庭原因', |
|||
value: 1, |
|||
}, |
|||
{ |
|||
label: '发展原因', |
|||
value: 2, |
|||
}, |
|||
{ |
|||
label: '合同到期不续约', |
|||
value: 3, |
|||
}, |
|||
{ |
|||
label: '其他', |
|||
value: 4, |
|||
}, |
|||
]; |
|||
} |
|||
if (quitType == 1) { |
|||
this.quitReason = [ |
|||
{ |
|||
label: '协议解除', |
|||
value: 5, |
|||
}, |
|||
{ |
|||
label: '无法胜任工作', |
|||
value: 6, |
|||
}, |
|||
{ |
|||
label: '裁员', |
|||
value: 7, |
|||
}, |
|||
{ |
|||
label: '严重违法违纪', |
|||
value: 8, |
|||
}, |
|||
]; |
|||
} |
|||
}, |
|||
}, |
|||
}); |
@ -1,111 +0,0 @@ |
|||
// 临时为豪恩部分页面内写死颜色的组件用的样式 |
|||
|
|||
// .link-btn { |
|||
// color: @primary-color !important; |
|||
// } |
|||
|
|||
// .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected { |
|||
// color: @primary-color !important; |
|||
// } |
|||
|
|||
// .ant-table-footer .ns-icon { |
|||
// color: @primary-color !important; |
|||
// } |
|||
|
|||
.ant-tree { |
|||
width: 100%; |
|||
} |
|||
.ant-tree .ant-tree-treenode { |
|||
width: 100%; |
|||
} |
|||
//侧边导航 |
|||
// .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected { |
|||
// background: rgb(229, 247, 249) !important; |
|||
// } |
|||
.ant-menu.ant-menu-dark .ant-menu-item-selected { |
|||
color: #fff; |
|||
background: rgba(0, 0, 0, 0.06) !important; |
|||
} |
|||
|
|||
.ant-menu-dark.ant-menu-horizontal > .ant-menu-item:hover { |
|||
background: rgba(0, 0, 0, 0.06) !important; |
|||
} |
|||
.ant-tree .ant-tree-node-content-wrapper { |
|||
transition: none !important; |
|||
} |
|||
// .ant-tree .ant-tree-node-content-wrapper:hover{ |
|||
// width: 100%; |
|||
// background: #EDF0F3 !important; |
|||
// } |
|||
.ant-menu-dark.ant-menu-horizontal > .ant-menu-item, |
|||
.ant-menu-dark.ant-menu-horizontal > .ant-menu-submenu { |
|||
color: #ffffff; |
|||
// background: #43BB79 !important; |
|||
} |
|||
|
|||
.home_header img { |
|||
height: 48px !important; |
|||
} |
|||
|
|||
.logo .logoImg { |
|||
max-height: 36px !important; |
|||
} |
|||
.lg_card { |
|||
margin-right: 130px !important; |
|||
} |
|||
|
|||
@media print { |
|||
html, |
|||
body { |
|||
overflow: unset !important; |
|||
} |
|||
#printLable img { |
|||
display: inline-block !important; |
|||
} |
|||
} |
|||
::-webkit-scrollbar-thumb { |
|||
background-color: #c6d2db !important; |
|||
} |
|||
|
|||
.ant-btn-primary:hover, |
|||
.ant-btn-primary:focus { |
|||
color: #ffff !important; |
|||
} |
|||
.ant-btn[disabled], .ant-btn[disabled]:hover, .ant-btn[disabled]:focus, .ant-btn[disabled]:active { |
|||
color: rgba(0, 0, 0, 0.25) !important; |
|||
} |
|||
|
|||
//入住登记,弹窗选择床位价格组件样式调整 |
|||
.noWrapList{ |
|||
width: 502px; |
|||
} |
|||
|
|||
.select-btn,.isMe{ |
|||
background-color: @primary-color!important; |
|||
} |
|||
|
|||
.anticon-check-circle{ |
|||
color: @primary-color!important; |
|||
} |
|||
|
|||
|
|||
.ns-modeBase{ |
|||
.ant-modal-title{ |
|||
font-weight: bold; |
|||
} |
|||
.ant-modal-body{ |
|||
padding: 0; |
|||
.ns-table .ns-table-main { |
|||
padding: 0 16px; |
|||
border-top: 16px solid #e5ebf0; |
|||
} |
|||
.ns-basic-modecontent{ |
|||
margin: 16px; |
|||
border-top: none; |
|||
border-right: 16px solid rgb(229, 235, 240); |
|||
border-bottom: 16px solid rgb(229, 235, 240); |
|||
border-left: 16px solid rgb(229, 235, 240); |
|||
border-image: initial; |
|||
} |
|||
} |
|||
} |
@ -1,156 +0,0 @@ |
|||
.ns-view { |
|||
min-height: 100%; |
|||
height: 100%; |
|||
background: #e5ebf0; |
|||
} |
|||
.ns-detail-content { |
|||
border-top: 16px solid #e5ebf0; |
|||
padding: 16px 21px; |
|||
background: #fff; |
|||
height: calc(100% - 50px); |
|||
} |
|||
|
|||
:deep(.ant-skeleton-paragraph) { |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
} |
|||
|
|||
:deep(.ant-skeleton-paragraph li:nth-child(n)) { |
|||
display: block; |
|||
margin-right: 4%; |
|||
margin-top: 16px; |
|||
margin-bottom: 4px; |
|||
} |
|||
|
|||
:deep(.ant-skeleton-paragraph li:nth-child(3n + 3)) { |
|||
margin-right: 0; |
|||
} |
|||
|
|||
:deep(.ant-skeleton-content) { |
|||
padding: 0 8px 10px 10px; |
|||
} |
|||
|
|||
:deep(.ant-descriptions-item-label) { |
|||
color: rgba(0, 0, 0, 0.5); |
|||
} |
|||
|
|||
:deep(.ant-descriptions-item-label), |
|||
:deep(.ant-descriptions-item-content) { |
|||
line-height: 22px; |
|||
} |
|||
|
|||
:deep(.ant-descriptions-view) { |
|||
padding-bottom: 8px; |
|||
} |
|||
|
|||
:deep(.ant-descriptions-item) { |
|||
padding-right: 20px; |
|||
|
|||
&:nth-child(2n) { |
|||
padding-left: 20px; |
|||
} |
|||
|
|||
&:nth-child(3n) { |
|||
padding-left: 20px; |
|||
padding-right: 0; |
|||
} |
|||
} |
|||
|
|||
.descriptions-title { |
|||
&:after { |
|||
content: ''; |
|||
width: 75px; |
|||
height: 7px; |
|||
display: block; |
|||
background: linear-gradient(90deg, #537fff 0%, #fff 82.67%); |
|||
margin-left: 2px; |
|||
margin-top: -2px; |
|||
} |
|||
} |
|||
|
|||
.ns-page-header { |
|||
margin-bottom: 0 !important; |
|||
padding-top: 7px !important; |
|||
padding-bottom: 7px !important; |
|||
width: calc(100% + 32px); |
|||
margin-left: -16px; |
|||
.title { |
|||
cursor: pointer; |
|||
font-size: 18px !important; |
|||
display: flex; |
|||
align-items: center; |
|||
.text { |
|||
margin-left: 6px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.ns-detail { |
|||
border-bottom: 1px solid #ecedef; |
|||
|
|||
&:last-child { |
|||
border-bottom-width: 0; |
|||
} |
|||
&:first-child { |
|||
:deep(.ant-descriptions-header) { |
|||
margin-top: 0; |
|||
} |
|||
} |
|||
|
|||
:deep(.ant-descriptions-header) { |
|||
margin-top: 12px; |
|||
margin-bottom: 12px; |
|||
|
|||
.ant-descriptions-title { |
|||
line-height: 16px; |
|||
font-size: 16px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
:deep(.ant-image) { |
|||
width: 64px; |
|||
height: 64px; |
|||
img { |
|||
width: 100%; |
|||
height: 100%; |
|||
object-fit: contain; |
|||
} |
|||
} |
|||
|
|||
.ns-detail-html { |
|||
:deep(table) { |
|||
border-top: 1px solid #ffffff; |
|||
border-left: 1px solid #ffffff; |
|||
|
|||
:deep(p) { |
|||
font-size: 12px; |
|||
color: #898e91; |
|||
} |
|||
} |
|||
|
|||
:deep(th) { |
|||
border-right: 1px solid #ffffff; |
|||
font-size: 13px; |
|||
padding-top: 5px; |
|||
padding-bottom: 5px; |
|||
font-weight: normal; |
|||
background: #eff0f2; |
|||
} |
|||
|
|||
:deep(td) { |
|||
border-top: 1px solid #ffffff; |
|||
border-right: 1px solid #ffffff; |
|||
padding-top: 5px; |
|||
padding-bottom: 5px; |
|||
font-size: 12px; |
|||
color: #606060; |
|||
text-align: center; |
|||
|
|||
:deep(text) { |
|||
border-bottom: 1px solid #ffffff; |
|||
} |
|||
|
|||
background: rgba(240, 242, 245, 0.5); |
|||
} |
|||
} |
@ -1,72 +0,0 @@ |
|||
.ns-view { |
|||
min-height: 100%; |
|||
height: 100%; |
|||
background: #e5ebf0; |
|||
} |
|||
|
|||
.ns-page-header { |
|||
margin-bottom: 0 !important; |
|||
padding: 7px 16px !important; |
|||
width: calc(100% + 32px); |
|||
margin-left: -16px; |
|||
|
|||
.title { |
|||
cursor: pointer; |
|||
font-size: 18px !important; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
.text { |
|||
margin-left: 6px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
:deep(.ant-spin-nested-loading) { |
|||
min-height: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
:deep(.ant-spin-container) { |
|||
min-height: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
:deep(.ant-divider) { |
|||
display: none; |
|||
} |
|||
|
|||
.ns-add-form { |
|||
border-top: 16px solid #e5ebf0; |
|||
padding: 16px 21px; |
|||
background: #fff; |
|||
height: calc(100% - 47px) !important; |
|||
|
|||
.ns-form { |
|||
|
|||
// 第一个子表单Title距离顶部为0 |
|||
:deep(.ns-form-item .ns-form-body .ns-child-form-title) { |
|||
padding-top: 0; |
|||
} |
|||
|
|||
&:after { |
|||
display: none !important; |
|||
} |
|||
} |
|||
|
|||
:deep(.ns-child-form-title) { |
|||
&:after { |
|||
content: ''; |
|||
width: 75px; |
|||
height: 7px; |
|||
display: block; |
|||
background: linear-gradient(90deg, @primary-color 0%, #fff 82.67%); |
|||
margin-left: 2px; |
|||
margin-top: -7px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
:deep(.ns-form.ns-vertical-form) { |
|||
padding-top: 16px !important; |
|||
} |
@ -1,67 +0,0 @@ |
|||
@font-face { |
|||
font-family: 'QuartzMS'; |
|||
src: url('/asset/font/QuartzMS.TTF') format('truetype'); |
|||
} |
|||
|
|||
|
|||
|
|||
.ant-menu-dark.ant-menu-horizontal>.ant-menu-item, |
|||
.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu { |
|||
color: #fff; |
|||
} |
|||
|
|||
.ant-menu-dark .ant-menu-item, |
|||
.ant-menu-dark .ant-menu-item-group-title, |
|||
.ant-menu-dark .ant-menu-item>a, |
|||
.ant-menu-dark .ant-menu-item>span>a { |
|||
color: #fff; |
|||
} |
|||
|
|||
.ant-menu-inline .ant-menu-item, |
|||
.ant-menu-inline .ant-menu-submenu-title { |
|||
width: 100% !important; |
|||
} |
|||
|
|||
.ns-basic-table .ant-btn:hover { |
|||
border-color: transparent !important; |
|||
} |
|||
|
|||
.ns-basic-table .ant-btn-link:hover { |
|||
background: none !important; |
|||
} |
|||
|
|||
.ns-richText-ZIndex { |
|||
z-index: 1; |
|||
} |
|||
|
|||
.ant-input-number { |
|||
width: 100%; //inputNumber组件宽度 |
|||
} |
|||
|
|||
// 详情table样式 |
|||
.ns-detail-content { |
|||
.ns-table .ns-table-main { |
|||
padding: 0; |
|||
} |
|||
|
|||
.ant-spin-nested-loading, |
|||
.ns-table, |
|||
.ns-table .ns-table-content { |
|||
min-height: 0 !important; |
|||
} |
|||
} |
|||
|
|||
|
|||
.ns-table-title { |
|||
text-align: left; |
|||
height: 46px; |
|||
line-height: 46px; |
|||
font-size: 18px; |
|||
font-weight: bold; |
|||
user-select: text; |
|||
padding-left: 16px; |
|||
background: #fff; |
|||
width: calc(100% + 32px); |
|||
margin-left: -16px; |
|||
cursor: pointer; |
|||
} |
@ -1,28 +0,0 @@ |
|||
.ns-table-title { |
|||
text-align: left; |
|||
height: 46px; |
|||
line-height: 46px; |
|||
font-size: 18px; |
|||
font-weight: bold; |
|||
user-select: text; |
|||
padding-left: 16px; |
|||
background: #fff; |
|||
width: calc(100% + 32px); |
|||
margin-left: -16px; |
|||
cursor: pointer; |
|||
} |
|||
|
|||
:deep(.ant-tabs-nav) { |
|||
margin-left: -16px !important; |
|||
margin-bottom: 0; |
|||
width: calc(100% + 32px); |
|||
background-color: #fff; |
|||
} |
|||
|
|||
.tab-list { |
|||
overflow: visible; |
|||
} |
|||
|
|||
.tab-operatorManage { |
|||
background-color: #fff; |
|||
} |
@ -1,2 +0,0 @@ |
|||
@import "variable"; |
|||
@import "global"; |
@ -1,2 +0,0 @@ |
|||
@primary-color: #37abc4; // 全局主色 |
|||
@layout-header-hover:#0096c7 |
@ -1,41 +0,0 @@ |
|||
'use strict'; |
|||
|
|||
import axios from 'axios'; |
|||
|
|||
// Full config: https://github.com/axios/axios#request-config
|
|||
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
|
|||
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
|||
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
|||
|
|||
let config = { |
|||
// baseURL: process.env.baseURL || process.env.apiUrl || ""
|
|||
// timeout: 60 * 1000, // Timeout
|
|||
// withCredentials: true, // Check cross-site Access-Control
|
|||
}; |
|||
|
|||
const _axios = axios.create(config); |
|||
|
|||
_axios.interceptors.request.use( |
|||
function (config) { |
|||
// Do something before request is sent
|
|||
return config; |
|||
}, |
|||
function (error) { |
|||
// Do something with request error
|
|||
return Promise.reject(error); |
|||
}, |
|||
); |
|||
|
|||
// Add a response interceptor
|
|||
_axios.interceptors.response.use( |
|||
function (response) { |
|||
// Do something with response data
|
|||
return response.data; |
|||
}, |
|||
function (error) { |
|||
// Do something with response error
|
|||
return Promise.reject(error); |
|||
}, |
|||
); |
|||
|
|||
export default _axios; |
@ -1,104 +0,0 @@ |
|||
export let bgColors = ['', '#1BB6B6', '#7E8BF9', '#E89E41']; |
|||
export let placeholderList = ['', '发起人', '审批']; |
|||
|
|||
export let setTypes = [ |
|||
{ value: 1, label: '指定成员' }, |
|||
{ value: 2, label: '主管' }, |
|||
{ value: 4, label: '发起人自选' }, |
|||
{ value: 5, label: '发起人自己' }, |
|||
{ value: 7, label: '连续多级主管' }, |
|||
]; |
|||
|
|||
export let selectModes = [ |
|||
{ value: 1, label: '选一个人' }, |
|||
{ value: 2, label: '选多个人' }, |
|||
]; |
|||
|
|||
export let selectRanges = [ |
|||
{ value: 1, label: '全公司' }, |
|||
{ value: 2, label: '指定成员' }, |
|||
{ value: 3, label: '指定角色' }, |
|||
]; |
|||
|
|||
export let optTypes = [ |
|||
{ value: '1', label: '小于' }, |
|||
{ value: '2', label: '大于' }, |
|||
{ value: '3', label: '小于等于' }, |
|||
{ value: '4', label: '等于' }, |
|||
{ value: '5', label: '大于等于' }, |
|||
{ value: '6', label: '介于两个数之间' }, |
|||
]; |
|||
|
|||
export let opt1s = [ |
|||
{ value: '<', label: '<' }, |
|||
{ value: '≤', label: '≤' }, |
|||
]; |
|||
|
|||
let ruzhi = [ |
|||
{ |
|||
label: '发起人', |
|||
value: 'faqiren', |
|||
sort: 1, |
|||
}, |
|||
{ |
|||
label: '主部门', |
|||
value: 'departmentMainUuid', |
|||
sort: 2, |
|||
}, |
|||
{ |
|||
label: '岗位状态', |
|||
value: 'personStatus', |
|||
sort: 3, |
|||
}, |
|||
{ |
|||
label: '性别', |
|||
value: 'sex', |
|||
sort: 4, |
|||
}, |
|||
]; |
|||
|
|||
let lizhi = [ |
|||
{ |
|||
label: '发起人', |
|||
value: 'faqiren', |
|||
sort: 1, |
|||
}, |
|||
{ |
|||
label: '离职类型', |
|||
value: 'quitType', |
|||
sort: 2, |
|||
}, |
|||
{ |
|||
label: '离职原因', |
|||
value: 'quitReason', |
|||
sort: 3, |
|||
}, |
|||
{ |
|||
label: '是否需要工作交接人', |
|||
value: 'workHandover', |
|||
sort: 4, |
|||
}, |
|||
]; |
|||
|
|||
let diaogang = [ |
|||
{ |
|||
label: '发起人', |
|||
value: 'faqiren', |
|||
sort: 1, |
|||
}, |
|||
{ |
|||
label: '调入主部门', |
|||
value: 'departmentInUuid', |
|||
sort: 2, |
|||
}, |
|||
]; |
|||
|
|||
let zhuanzheng = [ |
|||
{ |
|||
label: '发起人', |
|||
value: 'faqiren', |
|||
sort: 1, |
|||
}, |
|||
]; |
|||
|
|||
export let SelectType = ['', ruzhi, lizhi, zhuanzheng, diaogang]; |
@ -1,162 +0,0 @@ |
|||
import { assign } from 'lodash-es'; |
|||
|
|||
function All() {} |
|||
All.prototype = { |
|||
timer: '', |
|||
debounce(fn, delay = 500) { |
|||
var _this = this; |
|||
return function (arg) { |
|||
//获取函数的作用域和变量
|
|||
let that = this; |
|||
let args = arg; |
|||
clearTimeout(_this.timer); // 清除定时器
|
|||
_this.timer = setTimeout(function () { |
|||
fn.call(that, args); |
|||
}, delay); |
|||
}; |
|||
}, |
|||
setCookie(val) { |
|||
//cookie设置[{key:value}]、获取key、清除['key1','key2']
|
|||
for (var i = 0, len = val.length; i < len; i++) { |
|||
for (var key in val[i]) { |
|||
document.cookie = key + '=' + encodeURIComponent(val[i][key]) + '; path=/'; |
|||
} |
|||
} |
|||
}, |
|||
getCookie(name) { |
|||
var strCookie = document.cookie; |
|||
var arrCookie = strCookie.split('; '); |
|||
for (var i = 0, len = arrCookie.length; i < len; i++) { |
|||
var arr = arrCookie[i].split('='); |
|||
if (name == arr[0]) { |
|||
return decodeURIComponent(arr[1]); |
|||
} |
|||
} |
|||
}, |
|||
clearCookie(name) { |
|||
var myDate = new Date(); |
|||
myDate.setTime(-1000); //设置时间
|
|||
for (var i = 0, len = name.length; i < len; i++) { |
|||
document.cookie = '' + name[i] + "=''; path=/; expires=" + myDate.toGMTString(); |
|||
} |
|||
}, |
|||
arrToStr(arr) { |
|||
if (arr) { |
|||
return arr |
|||
.map((item) => { |
|||
return item.name; |
|||
}) |
|||
.toString(); |
|||
} |
|||
}, |
|||
toggleClass(arr, elem, key = 'id') { |
|||
return arr.some((item) => { |
|||
return item[key] == elem[key]; |
|||
}); |
|||
}, |
|||
toChecked(arr, elem, key = 'id') { |
|||
var isIncludes = this.toggleClass(arr, elem, key); |
|||
!isIncludes ? arr.push(elem) : this.removeEle(arr, elem, key); |
|||
}, |
|||
removeEle(arr, elem, key = 'id') { |
|||
var includesIndex; |
|||
arr.map((item, index) => { |
|||
if (item[key] == elem[key]) { |
|||
includesIndex = index; |
|||
} |
|||
}); |
|||
arr.splice(includesIndex, 1); |
|||
}, |
|||
setApproverStr(nodeConfig) { |
|||
let multiMode = ['', '依次审批', '会签', '或签']; |
|||
let assignee = nodeConfig.assignee; |
|||
if (!assignee) return ''; |
|||
if (assignee.assigneeType == 1) { |
|||
let userName = assignee.assigneeListUser |
|||
.map((item) => { |
|||
return item.personName; |
|||
}) |
|||
.join(','); |
|||
if (assignee.assigneeListUser.length == 1) return '指定员工' + userName; |
|||
return '指定员工' + userName + multiMode[assignee.multiMode]; |
|||
} else if (assignee.assigneeType == 2) { |
|||
return '所属部门负责人' + multiMode[assignee.multiMode]; |
|||
} else if (assignee.assigneeType == 3) { |
|||
return '主部门负责人' + multiMode[assignee.multiMode]; |
|||
} else if (assignee.assigneeType == 4) { |
|||
return '发起人自己'; |
|||
} else if (assignee.assigneeType == 5) { |
|||
if (assignee.lastLeaderLevel == 1) return '直属上级'; |
|||
return `第${assignee.lastLeaderLevel}级直属上级`; |
|||
} else if (assignee.assigneeType == 6) { |
|||
return `从 主部门负责人 到 发起人向上的第${assignee.lastLeaderLevel}级主链路部门负责人`; |
|||
} else if (assignee.assigneeType == 7) { |
|||
return `从 主部门负责人 到 组织架构中级别最高的第${assignee.lastLeaderLevel}级主部门负责人`; |
|||
} else if (assignee.assigneeType == 8) { |
|||
let roleName = assignee.createUserRole |
|||
?.map((item) => { |
|||
return item.label; |
|||
}) |
|||
.join(','); |
|||
return roleName + multiMode[assignee.multiMode]; |
|||
} |
|||
}, |
|||
dealStr(str, obj) { |
|||
let arr = []; |
|||
let list = str.split(','); |
|||
for (var elem in obj) { |
|||
list.map((item) => { |
|||
if (item == elem) { |
|||
arr.push(obj[elem].value); |
|||
} |
|||
}); |
|||
} |
|||
return arr.join('或'); |
|||
}, |
|||
conditionStr(nodeConfig, index) { |
|||
var { conditionGroupList } = nodeConfig.exclusive[index]; |
|||
// if (!conditionGroupList) conditionGroupList = [];
|
|||
// 做到这里了,继续处理conditionGroupList
|
|||
if (!conditionGroupList) { |
|||
return index == nodeConfig.exclusive.length - 1 && |
|||
nodeConfig.exclusive[0].conditionGroupList?.length != 0 |
|||
? '其他条件进入此流程' |
|||
: '请设置条件'; |
|||
} else { |
|||
let str = ''; |
|||
let content = []; |
|||
for (var i = 0; i < conditionGroupList.length; i++) { |
|||
var { conditionInfoList } = conditionGroupList[i]; |
|||
if (!conditionInfoList) conditionInfoList = []; |
|||
if (conditionInfoList.length) { |
|||
let group = conditionInfoList |
|||
.map((item) => { |
|||
return item.dotDesc; |
|||
}) |
|||
.join(' 且 '); |
|||
if (group) content.push(group); |
|||
} |
|||
} |
|||
str = content.join(' 或 '); |
|||
return str ? str : '请设置条件'; |
|||
} |
|||
}, |
|||
copyerStr(nodeConfig) { |
|||
console.log(nodeConfig); |
|||
if (nodeConfig.nodeUserList.length != 0) { |
|||
return this.arrToStr(nodeConfig.nodeUserList); |
|||
} else { |
|||
if (nodeConfig.ccSelfSelectFlag == 1) { |
|||
return '发起人自选'; |
|||
} |
|||
} |
|||
}, |
|||
toggleStrClass(item, key) { |
|||
let a = item.zdy1 ? item.zdy1.split(',') : []; |
|||
return a.some((item) => { |
|||
return item == key; |
|||
}); |
|||
}, |
|||
}; |
|||
|
|||
export default new All(); |
@ -1,14 +0,0 @@ |
|||
import { getCurrentInstance } from 'vue'; |
|||
|
|||
export default function useGetGlobalProperties() { |
|||
const { |
|||
emit, |
|||
appContext: { |
|||
app: { |
|||
config: { globalProperties }, |
|||
}, |
|||
}, |
|||
} = getCurrentInstance(); |
|||
|
|||
return { ...globalProperties }; |
|||
} |
@ -1,48 +0,0 @@ |
|||
<template> |
|||
<div ref="FCKEditor" style="z-index: 1"> </div> |
|||
</template> |
|||
<script> |
|||
import { defineComponent, ref, inject, watch, onMounted } from 'vue'; |
|||
import Editor from 'wangeditor'; |
|||
export default defineComponent({ |
|||
name: 'FCKEditor', |
|||
props: { |
|||
value: String, |
|||
}, |
|||
emit: ['change'], |
|||
setup(props, ctx) { |
|||
const editor = ref({}); |
|||
const components = inject('components'); |
|||
const FCKEditor = ref(); |
|||
let editorHtml = ref(); |
|||
|
|||
onMounted(() => { |
|||
let editor = new Editor(FCKEditor.value); |
|||
editor.config.uploadImgShowBase64 = true; |
|||
editor.config.withCredentials = true; |
|||
editor.config.onchange = function (html) { |
|||
editorHtml.value = html; |
|||
ctx.emit('change', editorHtml.value); |
|||
}; |
|||
editor.create(); |
|||
editor.txt.html(props.value); |
|||
|
|||
watch( |
|||
() => props.value, |
|||
(val) => { |
|||
if (val !== editor.txt.html()) { |
|||
editor.txt.html(val); |
|||
} |
|||
} |
|||
); |
|||
}); |
|||
|
|||
return { |
|||
editor, |
|||
components, |
|||
FCKEditor, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
|||
<style lang="less" scoped></style> |
@ -1,100 +0,0 @@ |
|||
<!-- @format --> |
|||
|
|||
<template> |
|||
<div> |
|||
<a-upload |
|||
v-model:file-list="fileList" |
|||
name="file" |
|||
action="#" |
|||
:headers="headers" |
|||
:showUploadList="false" |
|||
accept="application/json" |
|||
:beforeUpload="beforeUpload" |
|||
:customRequest="customRequest"> |
|||
<ns-button> |
|||
<upload-outlined /> |
|||
文件上传 |
|||
</ns-button> |
|||
<div v-if="file" class="fileName" |
|||
><span>{{ file?.name }}</span |
|||
><CloseOutlined |
|||
style="font-size: 13px; position: relative; top: 2px" |
|||
@click="delTags($event)" /> |
|||
</div> |
|||
</a-upload> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { UploadOutlined, CloseOutlined } from '@ant-design/icons-vue'; |
|||
import { defineComponent, ref } from 'vue'; |
|||
export default defineComponent({ |
|||
components: { |
|||
UploadOutlined, |
|||
CloseOutlined, |
|||
}, |
|||
props: { |
|||
componentInfo: {}, |
|||
}, |
|||
emits: ['change'], |
|||
setup(props, context) { |
|||
const beforeUpload = (file) => { |
|||
const name = file.name; |
|||
// const reader = new FileReader(); |
|||
// reader.readAsText(file, 'UTF-8'); // 以文本格式读取文件 |
|||
// reader.onload = function (event) { |
|||
// context.emit('change', event.target.result); |
|||
// //console.log('--------', event.target.result); // 打印获取到的文件内容 |
|||
// }; |
|||
}; |
|||
const file = ref(); |
|||
const delTags = (e) => { |
|||
e.stopPropagation(); |
|||
file.value = null; |
|||
context.emit('change', null); |
|||
}; |
|||
const customRequest = async (e) => { |
|||
file.value = e?.file; |
|||
const reader = new FileReader(); |
|||
reader.readAsText(e?.file, 'UTF-8'); // 以文本格式读取文件 |
|||
reader.onload = function (event) { |
|||
context.emit('change', JSON.parse(event.target.result)); |
|||
//console.log('--------', event.target.result); // 打印获取到的文件内容 |
|||
}; |
|||
|
|||
// context.emit('change', e); |
|||
}; |
|||
return { |
|||
delTags, |
|||
file, |
|||
customRequest, |
|||
beforeUpload, |
|||
headers: { |
|||
authorization: 'authorization-text', |
|||
}, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
|||
|
|||
<style lang="less" scoped> |
|||
.fileName { |
|||
margin-top: 10px; |
|||
|
|||
padding: 2px 16px 2px 0px; |
|||
text-align: center; |
|||
justify-content: center; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
cursor: pointer; |
|||
font-size: 14px; |
|||
height: 30px; |
|||
color: #808d96; |
|||
span { |
|||
font-size: 14px; |
|||
color: @text-color-secondary; |
|||
margin-right: 15px; |
|||
} |
|||
} |
|||
</style> |
@ -1,372 +0,0 @@ |
|||
<!-- @format --> |
|||
|
|||
<template> |
|||
<ns-page-header class="ns-page-header"> |
|||
<template #title> |
|||
<div class="title" @click="onBack()"> |
|||
<ns-icon name="left" /> <div class="text">{{ title }}</div> |
|||
</div> |
|||
</template> |
|||
<template #extra> |
|||
<!-- <ns-button @click="onBack()">返回</ns-button> --> |
|||
<ns-button v-if="status == 5" type="primary" @click="checkReq('pass')">审核通过</ns-button> |
|||
<ns-button v-if="status == 5" type="primary" @click="checkReq('reject')">审核驳回</ns-button> |
|||
</template> |
|||
</ns-page-header> |
|||
<Skeleton |
|||
active |
|||
v-for="(detailGroup, index) in getDetail" |
|||
:key="index" |
|||
:loading="loading" |
|||
:paragraph="detailGroup.SkeletonParagraphProps" |
|||
:title="SkeletonTitleProps"> |
|||
<div class="ns-detail"> |
|||
<a-descriptions :title="detailGroup.title"> |
|||
<a-descriptions-item |
|||
v-for="(item, index) in detailGroup.items" |
|||
:key="index" |
|||
:label="item.label"> |
|||
<span v-if="!item.type">{{ item.value || '-' }}</span> |
|||
|
|||
<ns-view-list-table v-if="item.type === 'nsViewListTable'" v-bind="item.tableConfig" /> |
|||
|
|||
<a-image |
|||
v-if="item.type === 'image' && typeof item.value == 'string'" |
|||
:width="100" |
|||
:src="item.value.includes('http') ? item.value : `/api/op/objs/ParkPic/${item.value}`" |
|||
fallback="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==" /> |
|||
|
|||
<!-- eslint-disable-next-line vue/no-v-html --> |
|||
<div v-if="item.type == 'html'" v-html="formatTable(item.value)"></div> |
|||
<a v-if="item.type == 'billImage' && item.value" target="_blank" :href="item.value" |
|||
>发票链接 |
|||
</a> |
|||
|
|||
<!-- 多条超链接 --> |
|||
<div v-if="item.type == 'hyperlink'"> |
|||
<a |
|||
v-for="(itemlink, indexlink) in item.value" |
|||
:key="indexlink" |
|||
:href="itemlink" |
|||
target="_blank" |
|||
rel="noopener noreferrer"> |
|||
{{ `发票链接${indexlink + 1}` }}  |
|||
</a> |
|||
</div> |
|||
|
|||
<template v-else-if="item.type == 'status'"> |
|||
<span :style="{ color: '#AAAAAA' }" v-if="item.value === 2">已失效</span> |
|||
<span :style="{ color: '#AAAAAA' }" v-if="item.value === 1">已核销</span> |
|||
<span :style="{ color: '#00AA11' }" v-if="item.value === 0">未核销</span> |
|||
</template> |
|||
|
|||
<div v-if="item.type === 'image' && typeof item.value == 'object'"> |
|||
<div |
|||
v-for="src in item.value" |
|||
:key="src" |
|||
style="display: inline-block; margin: 0 5px 5px 0"> |
|||
<a-image |
|||
:width="100" |
|||
:src="src.includes('http') ? src : `/api/op/objs/ParkPic/${src}`" |
|||
fallback="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==" /> |
|||
</div> |
|||
</div> |
|||
|
|||
<NsBasicTable |
|||
style="width: 100%" |
|||
v-if="item.type === 'table'" |
|||
:columns="item.columns" |
|||
:pagination="false" |
|||
:data-source="item.value"> |
|||
<template #payMethod="{ record }"> |
|||
<span>{{ |
|||
record.payMethod !== undefined && record.payMethod !== '' |
|||
? channelList[record.payMethod] |
|||
: '-' |
|||
}}</span> |
|||
</template> |
|||
<template #payChannel="{ record }"> |
|||
<span>{{ |
|||
record.payChannel !== undefined && record.payChannel !== '' |
|||
? ditchList[record.payChannel] |
|||
: '-' |
|||
}}</span> |
|||
</template> |
|||
|
|||
<template #status="{ record }"> |
|||
<div style="display: flex; align-items: center"> |
|||
<div |
|||
class="exanStatusIcon" |
|||
:style="[{ background: soldStatusColor[record.status] }]"></div> |
|||
<span>{{ |
|||
record.status !== undefined && record.status !== '' |
|||
? soldStatusList[record.status] |
|||
: '-' |
|||
}}</span> |
|||
</div> |
|||
</template> |
|||
<template #createTime="{ record }"> |
|||
<span>{{ moment(record.createTime).format('YYYY-MM-DD') }}</span> |
|||
</template> |
|||
<template #picture="{ record }"> |
|||
<span class="ns-enter-etable-img"> |
|||
<a-image |
|||
:src=" |
|||
record.picture.includes('http') |
|||
? record.picture |
|||
: '/api/op/objs/ParkPic/' + record.picture |
|||
" /> |
|||
</span> |
|||
</template> |
|||
<template #operation="{ record }"> |
|||
<a @click="toRenew(record)">续费</a> |
|||
</template> |
|||
<template #time="{ record }"> |
|||
<span>{{ record.startTime + '~' + record.endTime }}</span> |
|||
</template> |
|||
</NsBasicTable> |
|||
</a-descriptions-item> |
|||
</a-descriptions> |
|||
</div> |
|||
</Skeleton> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
import moment from 'moment'; |
|||
import { computed, defineComponent, ref, watch, PropType, createVNode } from 'vue'; |
|||
import { http } from '/nerv-lib/util/http'; |
|||
import { useRouter } from 'vue-router'; |
|||
import { get } from 'lodash-es'; |
|||
import { Skeleton } from 'ant-design-vue'; |
|||
import { NsModal } from '/nerv-lib/component/modal'; |
|||
import { NsMessage } from '/nerv-lib/component/message'; |
|||
|
|||
export interface DetailItem { |
|||
label: string; |
|||
name: string; |
|||
value?: string; |
|||
format?: Function; |
|||
type?: string; // 现支持image |
|||
} |
|||
|
|||
export interface DetailGroup { |
|||
title: string; |
|||
items: Array<DetailItem>; |
|||
} |
|||
|
|||
export default defineComponent({ |
|||
name: 'DetailForAudit', |
|||
props: { |
|||
detail: { |
|||
type: Array as PropType<DetailGroup>, |
|||
default: () => [], |
|||
}, |
|||
api: { |
|||
type: String, |
|||
}, |
|||
checkApi: { |
|||
type: String, |
|||
}, |
|||
enumType: { |
|||
type: Array, |
|||
}, |
|||
title: { |
|||
type: String, |
|||
default: '查看', |
|||
}, |
|||
formLayout: { |
|||
type: String, |
|||
default: '', |
|||
}, |
|||
}, |
|||
components: { Skeleton }, |
|||
setup(props) { |
|||
const SkeletonTitleProps = ref({ |
|||
width: 150, |
|||
}); |
|||
const router = useRouter(); |
|||
const status = ref(); |
|||
const { query } = router.currentRoute.value; |
|||
status.value = query.status; |
|||
// const check = query.status == 5 ? true : false; |
|||
const dataRef = ref([]); |
|||
const textTitle = props.title?.slice(2); |
|||
const checkReq = (type) => { |
|||
const text = { |
|||
pass: { |
|||
title: '审核通过', |
|||
content: `审核通过后将发布${textTitle}`, |
|||
value: 1, |
|||
}, |
|||
reject: { |
|||
title: '审核驳回', |
|||
content: `确认驳回该${textTitle}发布内容?`, |
|||
value: 0, |
|||
}, |
|||
}; |
|||
NsModal.confirm({ |
|||
title: createVNode('div', { style: 'font-weight:600;font-size: 16px' }, text[type].title), |
|||
content: createVNode('div', { style: 'font-size: 14px' }, text[type].content), |
|||
// icon: createVNode(ExclamationCircleOutlined), |
|||
okText: '确认', |
|||
cancelText: '取消', |
|||
onOk() { |
|||
req(text[type].value); |
|||
}, |
|||
onCancel() {}, |
|||
}); |
|||
}; |
|||
const req = (val) => { |
|||
const data = { |
|||
...query, |
|||
approvalStatus: val, |
|||
status: props.enumType[val], |
|||
}; |
|||
http.post(props.checkApi, data).then((res) => { |
|||
NsMessage.success('操作成功', 1, () => { |
|||
router.back(); |
|||
}); |
|||
}); |
|||
}; |
|||
const formatTable = (a) => { |
|||
if (a) { |
|||
// content = content.replace(/<br[^>]*\/>/gi, ''); |
|||
a = a.replace(/<th[^<>]*>/gi, '<th style="background-color:#F0F3F4;padding:5px 5px">'); |
|||
a = a.replace(/<td[^<>]*>/gi, '<td style="padding:5px 5px">'); |
|||
a = a.replace( |
|||
/<table[^>]*>/gi, |
|||
'<table cellpadding="0" cellspacing="0" max-width="100%" border="1" style=" text-align:center;border: 1px solid #ccc;"', |
|||
); |
|||
return a; |
|||
} else { |
|||
return null; |
|||
} |
|||
}; |
|||
|
|||
let loading = ref<boolean>(true); |
|||
function request() { |
|||
http.get(props.api, query).then((res) => { |
|||
dataRef.value = res.data; |
|||
// console.log(dataRef.value); |
|||
|
|||
let info = { carNumber: '', carOwnerName: '', carOwnerPhone: '' }; |
|||
info.carNumber = res.data.carNumber; |
|||
info.carOwnerName = res.data.carOwnerName; |
|||
info.carOwnerPhone = res.data.carOwnerPhone; |
|||
window.sessionStorage.setItem('carInfo', JSON.stringify(info)); |
|||
loading.value = false; |
|||
}); |
|||
} |
|||
const toRenew = (item) => { |
|||
// console.log(item); |
|||
router.push(`/monthly/car/add?uuid=renew`); |
|||
}; |
|||
|
|||
const getDetail = computed(() => { |
|||
const { detail } = props; |
|||
if (dataRef.value) { |
|||
return (detail as Array<DetailGroup>).map((group: DetailGroup) => { |
|||
const pushWidth = []; |
|||
for (let index = 0; index < group.items.length; index++) { |
|||
pushWidth.push(200); |
|||
} |
|||
return { |
|||
title: group.title, |
|||
items: group.items.map((item) => { |
|||
item.value = get(dataRef.value, item.name); |
|||
if (item.format) { |
|||
item.value = item.format(item.value, dataRef.value); |
|||
} |
|||
return item; |
|||
}), |
|||
SkeletonParagraphProps: { |
|||
rows: group.items.length, |
|||
width: pushWidth, |
|||
}, |
|||
}; |
|||
}); |
|||
} |
|||
return []; |
|||
}); |
|||
return { |
|||
soldStatusList: ['已失效', '生效中', '待生效'], |
|||
soldStatusColor: ['#4EC8EE', '#43BB79', '#BFBFBF'], |
|||
carTypeList: ['非新能源车', '新能源车'], |
|||
channelList: ['微信', '支付宝', '银联', '现金'], |
|||
ditchList: ['平台', '小程序'], |
|||
request, |
|||
getDetail, |
|||
toRenew, |
|||
moment, |
|||
loading, |
|||
SkeletonTitleProps, |
|||
formatTable, |
|||
checkReq, |
|||
status, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.request(); |
|||
}, |
|||
methods: { |
|||
onBack() { |
|||
this.$router.back(); |
|||
}, |
|||
}, |
|||
}); |
|||
</script> |
|||
|
|||
<style lang="less" scoped> |
|||
:deep(.ant-skeleton-paragraph) { |
|||
display: inline; |
|||
// display: flex; |
|||
// flex-wrap: wrap; |
|||
} |
|||
:deep(.ant-skeleton-paragraph li:nth-child(n)) { |
|||
float: left; |
|||
display: inline; |
|||
margin-right: 130px; |
|||
margin-top: 16px; |
|||
margin-bottom: 4px; |
|||
} |
|||
:deep(.ant-skeleton-paragraph li:nth-child(3n + 1)) { |
|||
clear: both; |
|||
display: inline; |
|||
} |
|||
:deep(.ant-skeleton-content) { |
|||
padding: 0 24px; |
|||
} |
|||
.ns-detail { |
|||
padding: 16px 24px; |
|||
} |
|||
.exanStatusIcon { |
|||
height: 8px; |
|||
width: 8px; |
|||
border-radius: 50%; |
|||
margin-right: 5px; |
|||
} |
|||
|
|||
:deep(.ns-enter-etable-img) { |
|||
.upload-img-box { |
|||
display: flex; |
|||
align-items: center; |
|||
.ant-image { |
|||
margin-right: 5px; |
|||
} |
|||
} |
|||
img { |
|||
max-width: 50px; |
|||
max-height: 50px; |
|||
cursor: pointer; |
|||
width: unset; |
|||
} |
|||
} |
|||
|
|||
:deep(.ant-table-wrapper) { |
|||
width: 78vw; |
|||
} |
|||
.ns-page-header { |
|||
border-bottom: 16px solid #e5ebf0 !important; |
|||
} |
|||
@import '/@/theme/form.less'; |
|||
</style> |
@ -1,628 +0,0 @@ |
|||
<!-- @format --> |
|||
|
|||
<template> |
|||
<div> |
|||
<div v-show="false">{{ getDetail }}</div> |
|||
|
|||
<!-- <Editor v-model="jsonStr" height="400" /> --> |
|||
<a-table |
|||
:columns="isDisable ? columns.slice(0, columns.length - 1) : columns" |
|||
:data-source="dataSource" |
|||
align="center" |
|||
:pagination="false" |
|||
rowKey="paramKey"> |
|||
<template #headerCell="{ column }"> |
|||
<template v-if="column.required"> |
|||
<div class="mainColum">{{ column.title }}</div> |
|||
</template> |
|||
</template> |
|||
|
|||
<template |
|||
v-for="col in columns.slice(0, columns.length - 1)" |
|||
#[col.dataIndex]="{ record }" |
|||
:key="col.dataIndex"> |
|||
<a-form-item |
|||
v-if="col.verification && !isDisable" |
|||
:validate-status="col.validator(record)" |
|||
:help="col.validator(record, col) === 'error' ? '' : ''" |
|||
style="width: 150px"> |
|||
<a-tooltip> |
|||
<template v-if="col.validator(record, col) === 'error'" #title>{{ |
|||
col.errorTitle |
|||
}}</template> |
|||
<component |
|||
style="min-width: 120px; width: 130px" |
|||
v-model:value="record[col.dataIndex]" |
|||
:is="col.component" |
|||
:disabled="dealDisabled(col, record)" |
|||
v-bind="col.formProps" /> |
|||
</a-tooltip> |
|||
</a-form-item> |
|||
|
|||
<a-form-item v-else style="width: 100px"> |
|||
<component |
|||
style="max-width: 100px" |
|||
v-model:value="record[col.dataIndex]" |
|||
:is="col.component" |
|||
:disabled="dealDisabled(col, record)" |
|||
v-bind="dealFormProps(col, record)" /> |
|||
</a-form-item> |
|||
</template> |
|||
<template #action="{ index, record }" v-if="!isDisable"> |
|||
<div style="min-width: 120px"> |
|||
<a style="cursor: pointer" v-if="record.type === 'object'||record.isProperty" @click="remove(index, record)">移除</a> |
|||
<a |
|||
style="cursor: pointer; margin-left: 12px" |
|||
v-if="dealAddProperty(record)" |
|||
@click="addProperty(index, record)" |
|||
>添加子属性</a |
|||
> |
|||
</div> |
|||
</template> |
|||
<!-- <template #footer v-if="!isDisable"> |
|||
<span style="cursor: pointer" @click="add"> 添加</span> |
|||
</template> --> |
|||
</a-table> |
|||
</div> |
|||
</template> |
|||
<script lang="ts"> |
|||
import { defineComponent, ref, inject, watch, computed } from 'vue'; |
|||
import { |
|||
Table as ATable, |
|||
Input as AInput, |
|||
Select as ASelect, |
|||
Textarea as ATextarea, |
|||
} from 'ant-design-vue'; |
|||
export default defineComponent({ |
|||
name: 'NsEditTable', |
|||
props: { |
|||
value: {}, |
|||
initColumns: { |
|||
type: Array, |
|||
default: () => [], |
|||
}, |
|||
initDataSource: { |
|||
type: Array, |
|||
default: () => [], |
|||
}, |
|||
isDisable: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
|
|||
initData: { |
|||
type: Array, |
|||
default: () => <object>[], |
|||
}, |
|||
}, |
|||
components: { ATable, AInput, ASelect, ATextarea }, |
|||
emits: ['change'], |
|||
setup(props) { |
|||
//const columns = ref<object>([]); |
|||
const initItem = ref({ |
|||
name: null, |
|||
type: 'string', |
|||
defaultValue: '', |
|||
parameterType: '', |
|||
description: '', |
|||
}); |
|||
const columns = ref([ |
|||
{ |
|||
title: '参数名', |
|||
dataIndex: 'name', |
|||
slots: { customRender: 'name' }, |
|||
verification: true, |
|||
required: true, |
|||
validator: (record) => { |
|||
if (!/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/.test(record.name)) { |
|||
return 'error'; |
|||
} else { |
|||
return 'success'; |
|||
} |
|||
}, |
|||
errorTitle: |
|||
'只能包含字母,数字,短横线(-)和下划线(_),且必须由大小字母或数字开头。长度限制在1-64字符之间', |
|||
component: 'AInput', |
|||
}, |
|||
{ |
|||
title: '类型', |
|||
dataIndex: 'type', |
|||
slots: { customRender: 'type' }, |
|||
component: 'ASelect', |
|||
formProps: { |
|||
placeholder: '请选择', |
|||
options: [ |
|||
{ value: 'string', label: 'string' }, |
|||
{ value: 'number', label: 'number' }, |
|||
{ value: 'array', label: 'array' }, |
|||
{ value: 'object', label: 'object' }, |
|||
{ value: 'Boolean', label: 'Boolean' }, |
|||
{ value: 'integer', label: 'integer' }, |
|||
], |
|||
}, |
|||
}, |
|||
// { |
|||
// title: '是否必填', |
|||
// dataIndex: 'required', |
|||
// slots: { customRender: 'required' }, |
|||
// component: 'ASelect', |
|||
// formProps: { |
|||
// options: [ |
|||
// { value: true, label: '是' }, |
|||
// { value: false, label: '否' }, |
|||
// ], |
|||
// }, |
|||
// }, |
|||
{ |
|||
title: '默认值', |
|||
dataIndex: 'defaultValue', |
|||
slots: { customRender: 'defaultValue' }, |
|||
component: 'AInput', |
|||
verification: true, |
|||
validator: (record) => { |
|||
return 'success'; |
|||
// if (record.defaultValue !== '') { |
|||
// if (record.defaultValue.length <= 255) { |
|||
// switch (record.type) { |
|||
// case 'String': |
|||
// break; |
|||
// case 'Int': |
|||
// if (isNaN(Number(record.defaultValue))) { |
|||
// return 'error'; |
|||
// } else { |
|||
// if (Number(record.defaultValue) % 1 !== 0) { |
|||
// return 'error'; |
|||
// } else { |
|||
// let arr = record.defaultValue.split('.'); |
|||
// if (arr.length > 1) { |
|||
// return 'error'; |
|||
// } else { |
|||
// return 'success'; |
|||
// } |
|||
// } |
|||
// } |
|||
// break; |
|||
// case 'Boolean': |
|||
// if (record.defaultValue !== 'true' && record.defaultValue !== 'false') { |
|||
// return 'error'; |
|||
// } else { |
|||
// return 'success'; |
|||
// } |
|||
// break; |
|||
// case 'Long': |
|||
// if (isNaN(Number(record.defaultValue))) { |
|||
// return 'error'; |
|||
// } else { |
|||
// if (Number(record.defaultValue) % 1 !== 0) { |
|||
// return 'error'; |
|||
// } else { |
|||
// let arr = record.defaultValue.split('.'); |
|||
// if (arr.length > 1) { |
|||
// return 'error'; |
|||
// } else { |
|||
// return 'success'; |
|||
// } |
|||
// } |
|||
// } |
|||
// break; |
|||
// case 'Float': |
|||
// if (isNaN(Number(record.defaultValue))) { |
|||
// return 'error'; |
|||
// } else { |
|||
// if (Number(record.defaultValue) % 1 === 0) { |
|||
// let arr = record.defaultValue.split('.'); |
|||
// if (arr.length > 1 && arr[1].indexOf('0') !== -1) { |
|||
// return 'success'; |
|||
// } else { |
|||
// return 'error'; |
|||
// } |
|||
// } else { |
|||
// return 'success'; |
|||
// } |
|||
// } |
|||
// break; |
|||
// case 'Double': |
|||
// if (isNaN(Number(record.defaultValue))) { |
|||
// return 'error'; |
|||
// } else { |
|||
// // console.log(Float32Array(record.defaultValue)); |
|||
// if (Number(record.defaultValue) % 1 === 0) { |
|||
// let arr = record.defaultValue.split('.'); |
|||
// if (arr.length > 1 && arr[1].indexOf('0') !== -1) { |
|||
// return 'success'; |
|||
// } else { |
|||
// return 'error'; |
|||
// } |
|||
// } else { |
|||
// return 'success'; |
|||
// } |
|||
// } |
|||
// break; |
|||
// } |
|||
// } else { |
|||
// return 'error'; |
|||
// } |
|||
// } |
|||
}, |
|||
errorTitle: '默认值类型与所选类型保持一致,长度不得超过255位', |
|||
formProps: {}, |
|||
}, |
|||
{ |
|||
title: '描述', |
|||
dataIndex: 'description', |
|||
slots: { customRender: 'description' }, |
|||
component: 'ATextarea', |
|||
formProps: { |
|||
showCount: true, |
|||
maxlength: 255, |
|||
}, |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
dataIndex: 'action', |
|||
slots: { customRender: 'action' }, |
|||
}, |
|||
]); |
|||
|
|||
const dataSource = ref<object[]>([ |
|||
{ |
|||
paramKey: 'key', |
|||
name: 'root', |
|||
isDisable: true, |
|||
type: 'string', |
|||
defaultValue: '', |
|||
description: '', |
|||
}, |
|||
]); |
|||
const addProperty = (index, record) => { |
|||
let info = JSON.parse(JSON.stringify(initItem.value)); |
|||
info.isProperty=true |
|||
// info.position = 'Body'; |
|||
if (record?.children) { |
|||
info.paramKey = `${record.paramKey}-${record.children.length}`; |
|||
// info.isDisable = true; |
|||
record.children.push(info); |
|||
} else { |
|||
info.paramKey = `${record.paramKey}-0`; |
|||
// info.isDisable = true; |
|||
record.children = [info]; |
|||
} |
|||
}; |
|||
const dealFormProps = (col, record) => { |
|||
return col.formProps; |
|||
// if (record.position === 'Body' && col.dataIndex === 'type') { |
|||
// let options = JSON.parse(JSON.stringify(col.formProps.options)); |
|||
// options.push({ value: 'Object', label: 'Object' }); |
|||
// return { |
|||
// placeholder: '请选择', |
|||
// options: options, |
|||
// }; |
|||
// } else { |
|||
// return col.formProps; |
|||
// } |
|||
}; |
|||
const dealAddProperty = (record) => { |
|||
if (!['object', 'array'].includes(record.type) && record.children) { |
|||
delete record['children']; |
|||
} |
|||
if (['object', 'array'].includes(record.type)) { |
|||
record.defaultValue = ''; |
|||
} |
|||
if (record.type === 'array' && !record.children) { |
|||
let info = JSON.parse(JSON.stringify(initItem.value)); |
|||
info.paramKey = `${record.paramKey}-0`; |
|||
info.name = 'items'; |
|||
info.isDisable = true; |
|||
record.children = [info]; |
|||
} |
|||
return record.type === 'object'; |
|||
}; |
|||
const dealDisabled = (col, record) => { |
|||
if (col.dataIndex === 'name' && record.isDisable) { |
|||
return true; |
|||
} |
|||
if (col.dataIndex === 'defaultValue' && ['array', 'object'].includes(record.type)) { |
|||
return true; |
|||
} |
|||
// return record.paramKey?.includes('-') && col.dataIndex === 'position'; |
|||
}; |
|||
if (props.initData && props.initData.length) { |
|||
dataSource.value = props.initData as object[]; |
|||
} |
|||
|
|||
const rule = { |
|||
required: true, |
|||
message: '请选择请求方法', |
|||
trigger: 'onchange', |
|||
}; |
|||
const getDetail = computed(() => { |
|||
const { value } = props; |
|||
if (value !== undefined && value) { |
|||
// dataSource.value = JSON.parse(value); |
|||
} |
|||
return value; |
|||
}); |
|||
const add = () => { |
|||
let info = JSON.parse(JSON.stringify(initItem.value)); |
|||
info.paramKey = dataSource.value.length + ''; |
|||
if (dataSource.value.length === 0 || dataSource.value[dataSource.value.length - 1].code) { |
|||
dataSource.value.push(info); |
|||
} else { |
|||
let ischeck = true; |
|||
dataSource.value.forEach((item) => { |
|||
console.log(item); |
|||
if (Object.keys(item).includes('name')) { |
|||
if (!/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/.test(item.name)) { |
|||
ischeck = false; |
|||
} else { |
|||
if (item.name === null) { |
|||
ischeck = false; |
|||
item.name = ''; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// if (Object.keys(item).includes('defaultValue')) { |
|||
// if (item.defaultValue !== '') { |
|||
// if (item.defaultValue.length <= 255) { |
|||
// switch (item.type) { |
|||
// case 'String': |
|||
// break; |
|||
// case 'Int': |
|||
// if (isNaN(Number(item.defaultValue))) { |
|||
// ischeck = false; |
|||
// } else { |
|||
// if (Number(item.defaultValue) % 1 !== 0) { |
|||
// ischeck = false; |
|||
// } else { |
|||
// let arr = item.defaultValue.split('.'); |
|||
// if (arr.length > 1) { |
|||
// ischeck = false; |
|||
// } |
|||
// } |
|||
// } |
|||
// break; |
|||
// case 'Boolean': |
|||
// if (item.defaultValue !== 'true' && item.defaultValue !== 'false') { |
|||
// ischeck = false; |
|||
// } |
|||
// break; |
|||
// case 'Long': |
|||
// if (isNaN(Number(item.defaultValue))) { |
|||
// ischeck = false; |
|||
// } else { |
|||
// if (Number(item.defaultValue) % 1 !== 0) { |
|||
// ischeck = false; |
|||
// } else { |
|||
// let arr = item.defaultValue.split('.'); |
|||
// if (arr.length > 1) { |
|||
// ischeck = false; |
|||
// } |
|||
// } |
|||
// } |
|||
// break; |
|||
// case 'Float': |
|||
// if (isNaN(Number(item.defaultValue))) { |
|||
// ischeck = false; |
|||
// } else { |
|||
// if (Number(item.defaultValue) % 1 === 0) { |
|||
// let arr = item.defaultValue.split('.'); |
|||
// if (arr.length > 1 && arr[1].indexOf('0') !== -1) { |
|||
// } else { |
|||
// ischeck = false; |
|||
// } |
|||
// } |
|||
// } |
|||
// break; |
|||
// case 'Double': |
|||
// if (isNaN(Number(item.defaultValue))) { |
|||
// ischeck = false; |
|||
// } else { |
|||
// if (Number(item.defaultValue) % 1 === 0) { |
|||
// let arr = item.defaultValue.split('.'); |
|||
// if (arr.length > 1 && arr[1].indexOf('0') !== -1) { |
|||
// } else { |
|||
// ischeck = false; |
|||
// } |
|||
// } |
|||
// } |
|||
// break; |
|||
// } |
|||
// } else { |
|||
// ischeck = false; |
|||
// } |
|||
// } |
|||
// } |
|||
}); |
|||
if (ischeck) { |
|||
dataSource.value.push(info); |
|||
} |
|||
} |
|||
}; |
|||
|
|||
const removeData = (list, key) => { |
|||
list.some((el, i) => { |
|||
if (el.paramKey === key) { |
|||
list.splice(i, 1); |
|||
return true; |
|||
} |
|||
if (el['children']) { |
|||
removeData(el['children'], key); |
|||
} |
|||
}); |
|||
}; |
|||
const remove = (i: number, record: { paramKey: string }) => { |
|||
removeData(dataSource.value, record.paramKey); |
|||
}; |
|||
const mockJson = ref({}); |
|||
const dealSchema = () => { |
|||
const info = dataSource.value[0]; |
|||
let schema = { |
|||
type: info.type, |
|||
title: info.name, |
|||
}; |
|||
if (info.defaultValue) schema['mock'] = { mock: info.defaultValue }; |
|||
if (info.description) schema['description'] = info.description; |
|||
if (info.type === 'array') { |
|||
schema.items = {}; |
|||
dealChildrenSchemaInfo(info, schema); |
|||
|
|||
// if (schemaInfo.children && schemaInfo.children.length) { |
|||
// schemaInfo.children.forEach((item) => { |
|||
// let childrenSchema = { |
|||
// type: item.type, |
|||
// title: item.name, |
|||
// }; |
|||
// if (item.defaultValue) childrenSchema['mock'] = { mock: item.defaultValue }; |
|||
// if (item.description) childrenSchema['description'] = item.description; |
|||
// if (item.type === 'array') { |
|||
// childrenSchema.items = { |
|||
// type: 'array', |
|||
// }; |
|||
// dealSchema(item, childrenSchema.items); |
|||
// } |
|||
// if (item.type === 'object') { |
|||
// childrenSchema.properties = {}; |
|||
// dealSchema(item, childrenSchema.properties); |
|||
// } |
|||
// schema.items = childrenSchema; |
|||
// }); |
|||
// } |
|||
} |
|||
if(info.type==='object'){ |
|||
schema.properties={} |
|||
dealSchemaObject(info,schema.properties) |
|||
} |
|||
// if (info.type === 'object') { |
|||
// fSchemaInfo[schemaInfo.name] = schema; |
|||
// schema.properties = {}; |
|||
// if (schemaInfo.children && schemaInfo.children.length) { |
|||
// schemaInfo.children.forEach((item) => { |
|||
// let childrenSchema = { |
|||
// type: item.type, |
|||
// title: item.name, |
|||
// }; |
|||
// if (item.defaultValue) childrenSchema['mock'] = { mock: item.defaultValue }; |
|||
// if (item.description) childrenSchema['description'] = item.description; |
|||
// if (item.type === 'object') { |
|||
// childrenSchema.properties = {}; |
|||
// dealSchema(item, childrenSchema.properties); |
|||
// } |
|||
// schema.properties[item.name] = childrenSchema; |
|||
// }); |
|||
// } |
|||
// } |
|||
|
|||
mockJson.value = schema; |
|||
}; |
|||
const dealSchemaObject = (schemaInfo, schema) => { |
|||
// debugger |
|||
if (schemaInfo.children && schemaInfo.children.length) { |
|||
schemaInfo.children?.forEach((item) => { |
|||
let info = { |
|||
type: item.type, |
|||
}; |
|||
if (item.defaultValue) info['mock'] = { mock: item.defaultValue }; |
|||
if (item.description) info['description'] = item.description; |
|||
if (item.type === 'array') { |
|||
schema[item.name] = info; |
|||
dealChildrenSchemaInfo(item, info); |
|||
} |
|||
if (item.type == 'object') { |
|||
info.properties= {} |
|||
schema[item.name] = info; |
|||
dealSchemaObject(item, info); |
|||
} |
|||
if (!['array', 'object'].includes(item.type)) { |
|||
schema[item.name] = info; |
|||
} |
|||
}); |
|||
} else { |
|||
schema[schemaInfo.name] = { type: schemaInfo.type }; |
|||
} |
|||
}; |
|||
const dealChildrenSchemaInfo = (schemaInfo, schema) => { |
|||
if (schemaInfo.children && schemaInfo.children.length) { |
|||
schemaInfo.children?.forEach((item) => { |
|||
let info = { |
|||
type: item.type, |
|||
}; |
|||
if (item.defaultValue) info['mock'] = { mock: item.defaultValue }; |
|||
if (item.description) info['description'] = item.description; |
|||
if (item.type === 'array') { |
|||
dealChildrenSchemaInfo(item, info); |
|||
schema.items = info; |
|||
} |
|||
if (item.type == 'object') { |
|||
info.properties={} |
|||
dealSchemaObject(item,info.properties) |
|||
schema.items = info; |
|||
} |
|||
if (!['array', 'object'].includes(item.type)) { |
|||
schema.items = info; |
|||
} |
|||
|
|||
|
|||
}); |
|||
} |
|||
}; |
|||
|
|||
return { |
|||
dealSchema, |
|||
getDetail, |
|||
dealDisabled, |
|||
dealFormProps, |
|||
rule, |
|||
dealAddProperty, |
|||
addProperty, |
|||
remove, |
|||
add, |
|||
dataSource, |
|||
columns, |
|||
mockJson, |
|||
}; |
|||
}, |
|||
watch: { |
|||
dataSource: { |
|||
handler(val) { |
|||
this.dealSchema(); |
|||
this.$emit('change', JSON.stringify(this.mockJson)); |
|||
}, |
|||
deep: true, |
|||
}, |
|||
}, |
|||
}); |
|||
</script> |
|||
|
|||
<style lang="less" scoped> |
|||
:deep(.ant-table-row-indent + .ant-table-row-expand-icon) { |
|||
margin-top: 0px !important; |
|||
} |
|||
:deep( |
|||
.ant-table-thead |
|||
> tr |
|||
> th:not(:last-child):not(.ant-table-selection-column):not( |
|||
.ant-table-row-expand-icon-cell |
|||
):not([colspan])::before |
|||
) { |
|||
display: none; |
|||
} |
|||
|
|||
.mainColum { |
|||
&::before { |
|||
display: inline-block; |
|||
margin-right: 4 px; |
|||
color: #ff4d4f; |
|||
font-size: 12px; |
|||
font-family: SimSun, sans-serif; |
|||
line-height: 1; |
|||
content: '*'; |
|||
} |
|||
} |
|||
|
|||
:deep(.ant-form-item-explain.ant-form-item-explain-error) { |
|||
display: flex; |
|||
min-width: 130px !important; |
|||
width: 140px !important; |
|||
} |
|||
</style> |
@ -1,252 +0,0 @@ |
|||
<!-- @format --> |
|||
|
|||
<template> |
|||
<!-- <div><editTable /> </div> --> |
|||
<div style="height: 100%"> |
|||
<a-layout style="height: 100%"> |
|||
<a-layout-header class="home_header" style="position: relative"> |
|||
<ns-icon name="login" size="100" style="width: 220px" /> |
|||
</a-layout-header> |
|||
<a-layout-content class="center-content"> |
|||
<div class="lg_card"> |
|||
<h1 class="lg_card_title">账号登录</h1> |
|||
<p v-show="!errorShow" style="height: 22px"></p> |
|||
<p v-show="errorShow" class="lg_card_error">{{ errorMsg }}</p> |
|||
<a-input |
|||
placeholder="登录账号" |
|||
v-model:value="userName" |
|||
style="height: 48px; margin-bottom: 20px"> |
|||
<template #prefix> |
|||
<ns-icon name="userName" size="25" style="margin-right: 5px" /> |
|||
</template> |
|||
</a-input> |
|||
<a-input-password placeholder="登录密码" v-model:value="password" style="height: 48px"> |
|||
<template #prefix> |
|||
<ns-icon name="passWord" size="25" style="margin-right: 5px" /> |
|||
</template> |
|||
</a-input-password> |
|||
<a-button |
|||
@click="submit" |
|||
:loading="loading" |
|||
type="primary" |
|||
style="margin-top: 30px; width: 100%; height: 53px" |
|||
>登录</a-button |
|||
> |
|||
</div> |
|||
</a-layout-content> |
|||
<a-layout-footer>Copyright 2021 xu科技 All Rights Reserved</a-layout-footer> |
|||
</a-layout> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
import { defineComponent, ref } from 'vue'; |
|||
import { useRouter } from 'vue-router'; |
|||
import editTable from './components/edit-table.vue'; |
|||
import { appConfigStore } from '/nerv-lib/saas/store/modules/app-config'; |
|||
import { authorizationService } from '/nerv-base/store/modules/authorization-service'; |
|||
import Cookies from 'js-cookie'; |
|||
export default defineComponent({ |
|||
name: 'UserLogin', |
|||
components: { editTable }, |
|||
setup() { |
|||
const url = ref('/asset/image/login/background.png'); |
|||
const userName = ref<string>(''); |
|||
const password = ref<string>(''); |
|||
const logUrl = ref<string>(''); |
|||
const bgUrl = ref<string>(''); |
|||
const errorMsg = ref<string>(''); |
|||
const errorShow = ref<boolean>(false); |
|||
const router = useRouter(); |
|||
const title = ref<string>(''); |
|||
const initUrl = ref(''); |
|||
title.value = '账号登录'; |
|||
// title.value = appConfig.title ? appConfig.title : '账号登录'; |
|||
const loading = ref<boolean>(false); |
|||
const configStore = appConfigStore(); |
|||
const useAuthorization = authorizationService(); |
|||
const submit = (): void => { |
|||
if (password.value === '') { |
|||
errorMsg.value = '请输入密码'; |
|||
errorShow.value = true; |
|||
} |
|||
if (userName.value === '') { |
|||
errorMsg.value = '请输入账号'; |
|||
errorShow.value = true; |
|||
} |
|||
if (userName.value !== '' && password.value !== '') { |
|||
errorShow.value = false; |
|||
let data = JSON.stringify({ userName: userName.value, password: password.value }); |
|||
loading.value = true; |
|||
async function logins() { |
|||
try { |
|||
const res = await configStore.userLogin(JSON.parse(data)); |
|||
if (res.success) { |
|||
if (res.data?.userToken) { |
|||
Cookies.set('nervsid', res.data?.userToken); |
|||
} |
|||
const info = await configStore.userInfo(); |
|||
info.success |
|||
? window.sessionStorage.setItem('userInfo', JSON.stringify(info.data)) |
|||
: ''; |
|||
loading.value = false; |
|||
if (configStore.enablePermissions) { |
|||
const res = await configStore.userResource(); |
|||
initUrl.value = ''; |
|||
const dealInitUrl = (item) => { |
|||
if (item.type === 'menus' && item.menus && item.menus?.length !== 0) { |
|||
dealInitUrl(item.menus[0]); |
|||
} else { |
|||
// if (item.type === 'noChildrenMenu') { |
|||
initUrl.value = configStore.resourceName |
|||
? item.code.replace(configStore.resourceName, '') |
|||
: item.code; |
|||
// } |
|||
} |
|||
}; |
|||
if (configStore.resourceName) { |
|||
const initResource = []; |
|||
res.data.forEach((item) => { |
|||
if (item.code.includes(configStore.resourceName)) { |
|||
initResource.push(item); |
|||
} |
|||
}); |
|||
dealInitUrl(initResource[0]); |
|||
} else { |
|||
dealInitUrl(res.data[0]); |
|||
} |
|||
// dealInitUrl(res.data[0]); |
|||
useAuthorization.updateUserResource(res.data); |
|||
const initRouterList = useAuthorization.getInitRouterList; |
|||
console.log(initUrl.value); |
|||
router.push({ |
|||
name: initRouterList.length === 0 ? 'error403' : initUrl.value, |
|||
}); |
|||
} else { |
|||
router.replace({ name: 'root' }); |
|||
} |
|||
} |
|||
} catch (err) { |
|||
loading.value = false; |
|||
} |
|||
} |
|||
logins(); |
|||
} |
|||
}; |
|||
const checkoutLogo = (): void => { |
|||
logUrl.value = ''; |
|||
}; |
|||
const checkoutBg = (): void => { |
|||
Math.random() > 0.5 |
|||
? (url.value = 'src/assetimg/background.jpg') |
|||
: (url.value = 'src/assetimg/background.png'); |
|||
}; |
|||
return { |
|||
title, |
|||
url, |
|||
loading, |
|||
userName, |
|||
password, |
|||
submit, |
|||
errorMsg, |
|||
bgUrl, |
|||
logUrl, |
|||
checkoutLogo, |
|||
checkoutBg, |
|||
errorShow, |
|||
}; |
|||
}, |
|||
created() { |
|||
const _this = this; |
|||
window.sessionStorage.clear(); |
|||
document.onkeydown = function (e) { |
|||
const key = window.event === undefined ? e.keyCode : window.event.keyCode; |
|||
key === 13 ? _this.submit() : ''; |
|||
}; |
|||
}, |
|||
beforeUnmount() { |
|||
document.onkeydown = function (e) {}; |
|||
}, |
|||
|
|||
mounted() { |
|||
// if (Cookies.get('nervsid') !== undefined) { |
|||
// this.$router.push('/home'); |
|||
// } |
|||
}, |
|||
}); |
|||
</script> |
|||
|
|||
<style lang="less" scoped> |
|||
.home_header { |
|||
height: 64px !important; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
:deep(.center-content) { |
|||
background: url('/asset/image/login/background.png') center center no-repeat; |
|||
background-size: cover; |
|||
|
|||
// background-position-y: -120px; |
|||
margin: 0; |
|||
} |
|||
.icon { |
|||
color: @primary-color; |
|||
// background: #000; |
|||
// min-height: 25px; |
|||
// min-width: 25px; |
|||
// display: flex; |
|||
// justify-content: center; |
|||
// align-items: center; |
|||
// border-radius: 50%; |
|||
} |
|||
.ant-layout-header { |
|||
min-height: 64px; |
|||
background: #fff !important; |
|||
} |
|||
|
|||
.ant-layout-content { |
|||
height: calc(100vh - 112px); |
|||
width: 100%; |
|||
min-height: 400px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: flex-end; |
|||
} |
|||
|
|||
.ant-layout-footer { |
|||
max-height: 48px; |
|||
min-height: 48px; |
|||
font-size: 14px; |
|||
font-weight: 400; |
|||
color: #8f8f8f; |
|||
padding: 0; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.lg_card { |
|||
width: 385px; |
|||
height: 353px; |
|||
background: #fff; |
|||
box-shadow: 0 2px 2px 0 rgb(0 0 0 / 5%), 0 0 18px 0 rgb(0 0 0 / 8%); |
|||
border-radius: 6px; |
|||
margin: 0 30px 0 30px; |
|||
padding: 35px; |
|||
} |
|||
|
|||
.lg_card .lg_card_title { |
|||
height: 28px; |
|||
font-size: 20px; |
|||
font-weight: bold; |
|||
color: #172e3d; |
|||
line-height: 28px; |
|||
text-align: left; |
|||
} |
|||
|
|||
.lg_card_error { |
|||
text-align: left; |
|||
color: #e4393c; |
|||
font-size: 14px; |
|||
} |
|||
</style> |
@ -1,212 +0,0 @@ |
|||
<template> |
|||
<ns-view-add-form |
|||
formLayout="vertical" |
|||
:schemas="formSchema" |
|||
:model="data" |
|||
:title="uuid ? '编辑功能测试' : '新增功能测试'" |
|||
:api=" |
|||
uuid |
|||
? '/api/op_com/objs/admin/functionRecordOper/update' |
|||
: '/api/op_com/objs/admin/functionRecordOper/add' |
|||
" /> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
import { defineComponent, reactive, ref } from 'vue'; |
|||
import { useRouter } from 'vue-router'; |
|||
import { http } from '/nerv-lib/util/http'; |
|||
|
|||
export default defineComponent({ |
|||
name: 'FunctionTestReleaseAdd', |
|||
setup() { |
|||
const router = useRouter(); |
|||
const { query } = router.currentRoute.value; |
|||
const { uuid } = query; |
|||
|
|||
let data = ref({ writeGroupUuidList: '' }); |
|||
if (uuid) { |
|||
http.get('/api/op_com/objs/admin/functionRecordOper/detail', query).then((res) => { |
|||
data.value = res.data; |
|||
data.value.writeGroupUuidList = res.data.functionWhiteGroupRelationVOList.map((item) => { |
|||
return item.whiteGroupUuid; |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
const formSchema = reactive([ |
|||
{ |
|||
field: 'uuid', |
|||
show: false, |
|||
component: 'NsInput', |
|||
}, |
|||
{ |
|||
field: 'funcName', |
|||
label: '功能名称', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
maxlength: 20, |
|||
disabled: uuid ? true : false, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
type: 'string', |
|||
trigger: 'blur', |
|||
validator: async (rule, value) => { |
|||
const reg = /^[\u4e00-\u9fa50-9a-zA-Z]{0,20}$/; |
|||
const _reg = /^[\u4e00-\u9fa5]$/; |
|||
if (value) { |
|||
let strLength = 0; |
|||
let strArray = value.split(''); |
|||
strArray.forEach((item) => { |
|||
if (_reg.test(item)) { |
|||
strLength += 2; |
|||
} else { |
|||
strLength += 1; |
|||
} |
|||
}); |
|||
if (!reg.test(value)) { |
|||
return Promise.reject('支持数字、字母和汉字'); |
|||
} else { |
|||
if (strLength > 20) { |
|||
return Promise.reject('不超过20个字符,中文为2个字符'); |
|||
} |
|||
} |
|||
} else { |
|||
return Promise.reject('功能名称不能为空'); |
|||
} |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'funcCode', |
|||
label: '功能code', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
maxlength: 20, |
|||
disabled: uuid ? true : false, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
type: 'string', |
|||
trigger: 'blur', |
|||
validator: async (rule, value) => { |
|||
const reg = /^[0-9a-zA-Z]{1,20}$/; |
|||
if (!value) { |
|||
return Promise.reject('功能code不能为空'); |
|||
} |
|||
if (value.indexOf(' ') !== -1) { |
|||
return Promise.reject('不能包含空格'); |
|||
} |
|||
if (!reg.test(value)) { |
|||
return Promise.reject('功能code支持英文字母、数字长度限制1~20'); |
|||
} |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'checkType', |
|||
label: '发布策略', |
|||
component: 'nsSelectApi', |
|||
// autoAddLink: true, |
|||
componentProps: { |
|||
api: '/api/op_com/objs/admin/functionRecordOper/checkTypeList', |
|||
placeholder: '请选择', |
|||
// params: { |
|||
// page: 0, |
|||
// pageSize: 200, |
|||
// }, |
|||
resultField: 'data.data', |
|||
labelField: 'name', |
|||
valueField: 'id', |
|||
immediate: true, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
type: 'number', |
|||
required: true, |
|||
message: '请选择发布策略', |
|||
trigger: 'change', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'writeGroupUuidList', |
|||
label: '白名单组', |
|||
component: 'nsSelectApi', |
|||
// autoAddLink: true, |
|||
ifShow: (formModel: Record<string, any>) => { |
|||
if (formModel.checkType === 2) { |
|||
// 判断发布策略值 |
|||
return true; |
|||
} |
|||
return false; |
|||
}, |
|||
componentProps: { |
|||
api: '/api/op_com/objs/admin/whiteListGroupOper/groupList', |
|||
placeholder: '请选择', |
|||
resultField: 'data.data', |
|||
labelField: 'groupName', |
|||
valueField: 'uuid', |
|||
mode: 'multiple', |
|||
immediate: true, |
|||
showSearch: true, |
|||
filterOption: (input, option) => { |
|||
return option?.groupName.indexOf(input) >= 0; |
|||
}, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
type: 'array', |
|||
message: '请选择白名单组', |
|||
trigger: 'change', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'desc', |
|||
label: '备注', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
}, |
|||
rules: [ |
|||
{ |
|||
type: 'string', |
|||
trigger: 'blur', |
|||
validator: async (rule, value) => { |
|||
const _reg = /^[\u4e00-\u9fa5]$/; |
|||
if (value) { |
|||
let strLength = 0; |
|||
let strArray = value.split(''); |
|||
strArray.forEach((item) => { |
|||
if (_reg.test(item)) { |
|||
strLength += 2; |
|||
} else { |
|||
strLength += 1; |
|||
} |
|||
}); |
|||
if (strLength > 100) { |
|||
return Promise.reject('不超过100个字符,中文为2个字符'); |
|||
} |
|||
} |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
]); |
|||
|
|||
return { |
|||
data, |
|||
formSchema, |
|||
uuid, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
@ -1,140 +0,0 @@ |
|||
<!-- @format --> |
|||
|
|||
<template> |
|||
<ns-view-list-table v-bind="tableConfig" rowKey="uuid" /> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
import { defineComponent } from 'vue'; |
|||
import { http } from '/nerv-lib/util/http'; |
|||
import { useRouter } from 'vue-router'; |
|||
|
|||
export default defineComponent({ |
|||
name: 'FunctionTestReleaseIndex', |
|||
setup() { |
|||
const router = useRouter(); |
|||
let checkTypeList: any = []; |
|||
http.get('/api/op_com/objs/admin/functionRecordOper/checkTypeList').then((res) => { |
|||
let data = res.data?.data; |
|||
data?.forEach((item: any) => { |
|||
checkTypeList[item.id] = item.name; |
|||
}); |
|||
}); |
|||
|
|||
const whiteGroupName = (group: any[]) => { |
|||
let data: string[] = []; |
|||
group?.length && group?.map((item) => data.push(item.whiteGroupName)); |
|||
return data.join(',') || '-'; |
|||
}; |
|||
const tableConfig = { |
|||
title: '功能测试', |
|||
api: '/api/op_com/objs/admin/functionRecordOper/pageList', |
|||
headerActions: [ |
|||
{ |
|||
label: '新增', |
|||
name: 'FunctionTestReleaseAdd', |
|||
type: 'primary', |
|||
handle: ({}, name: string) => router.push({ name }), |
|||
}, |
|||
], |
|||
rowSelection: null, |
|||
columns: [ |
|||
{ |
|||
title: '功能名称', |
|||
dataIndex: 'funcName', |
|||
// textNumber: 5, |
|||
}, |
|||
{ |
|||
title: '功能code', |
|||
dataIndex: 'funcCode', |
|||
// textNumber: 5, |
|||
}, |
|||
{ |
|||
title: '发布策略', |
|||
dataIndex: 'checkType', |
|||
// textNumber: 12, |
|||
customRender: (value: any) => checkTypeList[value.text], |
|||
}, |
|||
{ |
|||
title: '白名单组', |
|||
dataIndex: 'functionWhiteGroupRelationVOList', |
|||
textNumber: 10, |
|||
textEllipsis: true, |
|||
customRender: ({ value }: any) => whiteGroupName(value), |
|||
}, |
|||
{ |
|||
title: '备注', |
|||
dataIndex: 'desc', |
|||
textEllipsis: true, |
|||
textNumber: 9, |
|||
}, |
|||
], |
|||
columnActions: { |
|||
title: '操作', |
|||
actions: [ |
|||
{ |
|||
label: '编辑', |
|||
name: 'FunctionTestReleaseEdit', |
|||
handle: ({ uuid }: any, name: string) => router.push({ name, query: { uuid } }), |
|||
}, |
|||
{ |
|||
label: '刷新', |
|||
name: 'FunctionTestReleaseRefresh', |
|||
confirm: { |
|||
title: '提示', |
|||
content: `是否确认刷新缓存`, |
|||
}, |
|||
// api: { |
|||
// method: 'GET', |
|||
// url: '/api/op_com/objs/admin/functionRecordOper/refresh', |
|||
// }, |
|||
api: '/api/op_com/objs/admin/functionRecordOper/refresh', |
|||
dynamicParams: 'uuid', |
|||
isReload: true, |
|||
}, |
|||
], |
|||
}, |
|||
formConfig: { |
|||
schemas: [ |
|||
{ |
|||
field: 'funcName', |
|||
label: '功能名称', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'checkType', |
|||
label: '发布策略', |
|||
component: 'nsSelectApi', |
|||
componentProps: { |
|||
api: '/api/op_com/objs/admin/functionRecordOper/checkTypeList', |
|||
placeholder: '请选择', |
|||
resultField: 'data.data', |
|||
labelField: 'name', |
|||
valueField: 'id', |
|||
immediate: true, |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
}; |
|||
|
|||
return { |
|||
tableConfig, |
|||
whiteGroupName, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
|||
|
|||
<style lang="less"> |
|||
.desc { |
|||
overflow: hidden; |
|||
white-space: nowrap; |
|||
text-overflow: ellipsis; |
|||
display: block; |
|||
width: 100%; |
|||
} |
|||
</style> |
@ -1,164 +0,0 @@ |
|||
<template> |
|||
<ns-view-add-form |
|||
formLayout="vertical" |
|||
:schemas="formSchema" |
|||
:model="data" |
|||
:title="uuid ? '编辑白名单组' : '新增白名单组'" |
|||
:api=" |
|||
uuid |
|||
? '/api/op_com/objs/admin/whiteListGroupOper/update' |
|||
: '/api/op_com/objs/admin/whiteListGroupOper/add' |
|||
" /> |
|||
</template> |
|||
<script> |
|||
import { defineComponent, reactive, ref } from 'vue'; |
|||
import { useRouter } from 'vue-router'; |
|||
import { http } from '/nerv-lib/util/http'; |
|||
|
|||
export default defineComponent({ |
|||
name: 'WhiteListGroupAdd', |
|||
setup() { |
|||
const router = useRouter(); |
|||
const { uuid } = router.currentRoute.value.query; |
|||
// let data = reactive({ |
|||
// chargeGunUuid: uuid, |
|||
// chargeGunCode: chargeGunCode, //充电枪编号 |
|||
// chargeGunName: chargeGunName, //充电枪名称 |
|||
// // pileUuid: pileCode, |
|||
// }); |
|||
let data = ref({}); |
|||
let isInit = ref(false); |
|||
if (uuid) { |
|||
http |
|||
.get('/api/op_com/objs/admin/whiteListGroupOper/detail', { |
|||
uuid: uuid, |
|||
page: 0, |
|||
pageSize: 10, |
|||
}) |
|||
.then((res) => { |
|||
data.value = res.data; |
|||
isInit.value = true; |
|||
}) |
|||
.catch(() => { |
|||
isInit.value = true; |
|||
}); |
|||
} else { |
|||
isInit.value = true; |
|||
} |
|||
|
|||
const formSchema = reactive([ |
|||
{ |
|||
field: 'uuid', |
|||
show: false, |
|||
component: 'NsInput', |
|||
}, |
|||
{ |
|||
field: 'groupName', |
|||
label: '白名单组名称', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
disabled: uuid && true, |
|||
}, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: '请输入白名单组名称', |
|||
trigger: 'blur', |
|||
}, |
|||
{ |
|||
pattern: /^.{1,30}$/, |
|||
message: '长度不得超过30个字符', |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
field: 'groupType', |
|||
defaultValue: 0, |
|||
}, |
|||
// { |
|||
// field: 'groupType', |
|||
// label: '白名单组类型', |
|||
// component: 'NsSelect', |
|||
// componentProps: { |
|||
// placeholder: '请选择', |
|||
// // 禁止输入 |
|||
// // disabled: true, |
|||
// disabled: uuid && true, |
|||
|
|||
// options: [ |
|||
// { |
|||
// label: '活动白名单', |
|||
// value: 0, |
|||
// }, |
|||
// { |
|||
// label: '功能白名单', |
|||
// value: 1, |
|||
// }, |
|||
// ], |
|||
// }, |
|||
// rules: [ |
|||
// { |
|||
// required: true, |
|||
// message: '请选择白名单类型', |
|||
// type: 'number', |
|||
// trigger: 'blur', |
|||
// }, |
|||
// ], |
|||
// }, |
|||
// { |
|||
// field: 'functionCode', |
|||
// label: '功能code', |
|||
// component: 'NsInput', |
|||
// ifShow: (formModel) => { |
|||
// if (formModel.groupType) { |
|||
// return true; |
|||
// } |
|||
// return false; |
|||
// }, |
|||
// // defaultValue: , |
|||
// componentProps: { |
|||
// disabled: uuid && true, |
|||
// placeholder: '请输入', |
|||
// }, |
|||
// rules: [ |
|||
// { |
|||
// required: true, |
|||
// message: '请输入功能code', |
|||
// type: 'string', |
|||
// trigger: 'blur', |
|||
// }, |
|||
// { |
|||
// pattern: /^.{1,30}$/, |
|||
// message: '长度不得超过30个字符', |
|||
// trigger: 'blur', |
|||
// }, |
|||
// ], |
|||
// }, |
|||
{ |
|||
field: 'remark', |
|||
label: '备注', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
}, |
|||
rules: [ |
|||
{ |
|||
pattern: /^.{1,100}$/, |
|||
message: '长度不得超过100个字符', |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
}, |
|||
]); |
|||
|
|||
return { |
|||
data, |
|||
formSchema, |
|||
uuid, |
|||
isInit, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |
@ -1,116 +0,0 @@ |
|||
<!-- @format --> |
|||
|
|||
<template> |
|||
<ns-view-list-table v-bind="tableConfig" :model="data" rowKey="uuid"> |
|||
<template #bodyCell="{ record, column }"> |
|||
<template v-if="column.dataIndex === 'status'"> |
|||
<a-badge v-bind="onlineStatus[record.status]" /> |
|||
</template> |
|||
</template> |
|||
</ns-view-list-table> |
|||
</template> |
|||
<script lang="ts"> |
|||
import { defineComponent, reactive } from 'vue'; |
|||
import { useRouter } from 'vue-router'; |
|||
|
|||
export default defineComponent({ |
|||
name: 'WhiteListGroupIndex', |
|||
setup() { |
|||
const data = reactive({}); |
|||
const router = useRouter(); |
|||
const tableConfig = { |
|||
title: '白名单组', |
|||
api: '/api/op_com/objs/admin/whiteListGroupOper/pageList', |
|||
headerActions: [ |
|||
{ |
|||
label: '新增', |
|||
name: 'WhiteListGroupAdd', |
|||
type: 'primary', |
|||
handle: ({}, name: string) => router.push({ name }), |
|||
}, |
|||
], |
|||
rowSelection: null, |
|||
scorll: { x: '100%' }, |
|||
columns: [ |
|||
{ |
|||
title: '白名单组名称', |
|||
dataIndex: 'groupName', |
|||
width: '33%', |
|||
}, |
|||
{ |
|||
title: '用户数量', |
|||
dataIndex: 'userCount', |
|||
width: '33%', |
|||
// textNumber: 20, |
|||
}, |
|||
{ |
|||
title: '备注', |
|||
dataIndex: 'remark', |
|||
textNumber: 10, |
|||
width: '34%', |
|||
textEllipsis: true, |
|||
}, |
|||
], |
|||
columnActions: { |
|||
title: '操作', |
|||
actions: [ |
|||
{ |
|||
// 跳转白名单用户 |
|||
label: '查看', |
|||
name: 'WhiteListGroupCheck', |
|||
handle: ({ uuid }: any) => |
|||
router.push({ name: 'WhiteListUserIndex', query: { uuid } }), |
|||
}, |
|||
{ |
|||
label: '编辑', |
|||
name: 'WhiteListGroupEdit', |
|||
handle: ({ uuid }: any, name: string) => router.push({ name, query: { uuid } }), |
|||
}, |
|||
], |
|||
}, |
|||
|
|||
formConfig: { |
|||
schemas: [ |
|||
{ |
|||
field: 'groupName', |
|||
label: '白名单组名称', |
|||
component: 'NsInput', |
|||
componentProps: { |
|||
placeholder: '请输入', |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'groupType', |
|||
label: '白名单组类型', |
|||
component: 'NsSelect', |
|||
defaultValue: '', |
|||
componentProps: { |
|||
options: [ |
|||
{ |
|||
label: '全部', |
|||
value: '', |
|||
}, |
|||
{ |
|||
label: '活动白名单', |
|||
value: 0, |
|||
}, |
|||
{ |
|||
label: '功能白名单', |
|||
value: 1, |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
], |
|||
params: {}, |
|||
}, |
|||
rowKey: 'uuid', |
|||
}; |
|||
|
|||
return { |
|||
tableConfig, |
|||
data, |
|||
}; |
|||
}, |
|||
}); |
|||
</script> |