first commit

This commit is contained in:
编码猿
2024-09-27 01:28:38 +08:00
commit a9bde91e8e
2653 changed files with 701970 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie < 9

View File

@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@@ -0,0 +1 @@
28e5232e-ca11-40df-868f-3bbf45fd78a2

View File

@@ -0,0 +1,345 @@
## TsxVueClassApi
基于`Vue Class Api``TypeScript``JSX`,搭建的一套项目脚手架,实现了很多常用的注解,同时基于`babel`插件通过`Ast`语法树进行路由配置文件的自动生成等。
如果你喜欢`JSX`,那么这套脚手架你应该会十分喜欢,代码语法如下:
```tsx
import "@pageLess/Home.less";
import { Component, Vue } from 'vue-property-decorator';
import HelloWorld from '@components/HelloWorld';
import { HomeLogic } from "@logic/page/Home.logic";
import { Route, RawLocation } from 'vue-router';
import { Getter } from "vuex-class";
import { BaseLayout, RouterMeta } from "@layout/base.layout";
import { IndexUtils } from "@utils/index.utils";
import {Inject} from "@ann/Ioc.annotation";
@Component
export default class Home extends BaseLayout {
private logic: HomeLogic = new HomeLogic(this);
public RouterMeta: RouterMeta = {
title: '首页',
showNav: true,
isLogin: true
}
@Inject()
public readonly Utils!: IndexUtils;
@Getter('GettersTabsContentArr') public readonly getterFoo!: Array<any>;
public async created() {
// 使用 依赖注入 调用utils工具方法
// this.Utils.setToken("1111")
// 使用 装饰器@GlobalMethod() 调用utils工具方法
// this.$setToken("111")
await this.logic.StartUp();
}
beforeRouteEnter(to: Route, from: Route, next: (to?: RawLocation | false | ((vm: Vue) => void)) => void) {
next()
}
public ClickButton(): JSX.Element {
return (
<a-button type="primary" onClick={async ()=>{
await this.logic.getData()
}}>
Primary
</a-button>
)
}
protected render() {
return (
<div class="home">
<HelloWorld msg="向HelloWorld props传参"/>
<input type="text" v-model={this.logic.title}/>
<h2>{this.logic.title}</h2>
{this.ClickButton()}
<ul>
{
this.logic.List.map((v:any)=>{
return <li>{v.name}</li>
})
}
</ul>
</div>
)
}
}
```
**这个脚手架我们正在项目中使用,同时也在不断的开发和完善!!!!**
## 1安装
需要额外全局安装的插件有:
```bash
npm i -g concurrently cross-env gulp
```
然后下载项目,初始化并启动:
```bash
git clone https://gitee.com/bmycode/vue-class-api-tsx.git
npm i
npm run start
```
**注意**
`Vue`官方原生底层就支持`JSX`语法,但是官方没有关于`Vue`中使用`JSX`的文档,而且很多`Vue`ui框架和第三方插件都没有相关语法但是这不影响我们在`Vue`中正常使用`JSX`。很多语法需要特殊注意和改造一下!!
## 2使用
下面说下这个脚手架的使用和注意事项。
### 2.1:项目结构
请仔细看文件后面的中文说明!!!
```txt
├── README.md
├── babel.config.js babel配置文件
├── bin 终端NewFile工具
│   ├── config
│   │   └── index.js
│   └── tinit
├── dist 打包后的文件夹
├── gulpfile.js gulp配置文件实现监听page自动生成路由文件
├── package.json 核心依赖配置文件
├── public 公共的资源文件
├── src 存放核心源码
│   ├── application 页面相关
│   │   ├── App.tsx 最外层顶级父组件
│   │   ├── assets 静态资源回合webpack打包进源码
│   │   ├── components 公共组件
│   │   ├── layout 【重要】TSX组件的父类
│   │   ├── logic 【重要】TSX组件中的js逻辑抽象层
│   │   │   ├── Base.logic.ts 【重要】所有TSX组件的js逻辑父类
│   │   │   └── page 【重要】对应页面的TSX组件逻辑抽象
│   │   └── page 【重要】存放TSX页面组件
│   └── core 核心JS层
│   ├── annotation 存放自己开发的装饰器
│   │   ├── Http.annotation.ts 请求装饰器
│   │   ├── Ioc.annotation.ts IOC依赖装饰器
│   │   └── Register.annotation.ts 启动装饰器
│   ├── config 站点配置文件
│   │   ├── configure.config.ts 核心配置文件
│   │   └── route.config.ts 自动生成的路由配置文件
│   ├── dao axios的封装
│   ├── model TS存取器
│   ├── run 项目的启动类
│   │   ├── init.run.ts 初始化Vue各种配置
│   │   └── start.run.ts 初始化Vue
│   ├── service 请求的service层封装
│   │   └── impl 请求service的具体类
│   ├── store Vuex的配置
│   ├── types 自定义的声明文件
│   └── utils 工具函数
├── tsconfig.json TS的配置文件
└── vue.config.js Vue-cli3 的配合文件
```
### 2.2:编码注意事项和规范,严格遵守!!!
1`page/`文件夹中的所有`tsx`组件必须继承自`BaseLayout``BaseLayout`是所有页面的父类,可以在这里定义一些公共的声明文件!
2`logic/`文件夹中的所有`logic.ts`必须继承自`BaseLogic`并实现接口`Methods``BaseLogic`是所有页面逻辑层的公共封装,可以把使用率高的接口或者变量放在`BaseLogic`中去定义和实现,这样页面的逻辑层子类可以实现直接使用!
3`logic/`中页面的逻辑层可以使用装饰器`@Inject()`去注入多个`service`的依赖,实现对`ajax`中间层方法的调用,以发送`ajax`请求!具体的看下面代码
```typescript
import { Inject } from "@ann/Ioc.annotation";
// 1核心导入 UserServiceImpl 类
import { UserServiceImpl } from "@impl/User.service.impl";
import { BaseLogic, Methods } from "@logic/Base.logic";
export class HomeLogic extends BaseLogic implements Methods {
// 2核心注入 UserServiceImpl 请求中间层类到 HomeLogic类的属性 UserServiceImpl 中
@Inject()
public readonly user!: UserServiceImpl;
public title: string = "12222";
public List: any = [
{ id: 1, name: '2222' },
{ id: 1, name: '32434' }
];
constructor(point: any) {
super();
this.VueApp = point
}
/**
* 在这里面调用需要打开页面就执行的ajax请求
* @constructor
*/
public async StartUp(): Promise<void> {
}
/**
* 请求首页数据
*/
public async getData(): Promise<void> {
// 3核心调用IndexClass方法并传入ajax请求参数然后发送请求获取数据
// let result: any = await this.UserServiceImpl.IndexClass({ type: 1, page: 1 });
this.VueApp.$setToken("")
await this.VueApp.$router.push('/About')
}
}
```
4`logic/`中必须实现构造函数`constructor`,在构造函数中保存`tsx`页面传入指向`vue`实例的`this`,这样才能在`logic`中正确使用`vue`的一些方法,具体看代码:
```typescript
...
constructor(point: any) {
super();
// 1将point 保存到 VueApp 中
this.VueApp = point
}
/**
* 请求首页数据
*/
public async getData(): Promise<void> {
// 2使用vue实例中的 $router 方法,进行路由的跳转
await this.VueApp.$router.push('/About')
}
...
```
5如何将自定义的方法通过 `Vue.prototype.xxx` 挂载到`Vue`上以方便全局使用?
答:在`utils/index.utils.ts`中定义方法的时候请使用装饰器`@GlobalMethod()`装饰方法,然后如果你在`tsx`页面组件中需要使用此方法,那么请在`base.layout.ts`中定义变量并编写变量类型!
同时如果你需要在`logic`逻辑层使用此方法,那么需要在`Base.logic.ts``VueType`接口中编写类型。具体请看代码:
```typescript
// src/core/utils/index.utils.ts
import { ConfigureConfig } from "@config/configure.config";
import { GlobalMethod } from "@ann/Register.annotation";
export class IndexUtils {
/**
* 方法上打上 @GlobalMethod() 注解这个方法会自动成为vue的全局方法
* 组件中直接this.$setToken() 即可
*/
@GlobalMethod()
public setToken(args: string): void {
localStorage.setItem("token", args)
}
}
// src/application/logic/Base.logic.ts
// 定义 $setToken 方法和入参类型,返回值等!
export interface VueType extends Vue {
$setToken: (token: string) => void
}
```
如果你觉得上面方式使用全局方法太过于麻烦,那么你可以在你需要使用的`logic`类或`tsx`组件中使用装饰器`@Inject()`来注入`index.utils.ts`到类属性中,代码示例:
```typescript
import "@pageLess/Home.less";
import { Component, Vue } from 'vue-property-decorator';
import HelloWorld from '@components/HelloWorld';
import { HomeLogic } from "@logic/page/Home.logic";
import { Route, RawLocation } from 'vue-router';
import { Getter } from "vuex-class";
import { BaseLayout, RouterMeta } from "@layout/base.layout";
// 1导入需要被注入的类
import { IndexUtils } from "@utils/index.utils";
// 2导入装饰器
import {Inject } from "@ann/Ioc.annotation";
@Component
export default class Home extends BaseLayout {
private logic: HomeLogic = new HomeLogic(this);
// 3将 IndexUtils 注入到属性 Utils 中
@Inject()
public readonly Utils!: IndexUtils;
public async created() {
// 4使用 setToken 方法
this.Utils.setToken("1111")
}
protected render() {
return (
<div class="home">
<HelloWorld msg="向HelloWorld props传参"/>
<input type="text" v-model={this.logic.title}/>
<h2>{this.logic.title}</h2>
{this.ClickButton()}
<ul>
{
this.logic.List.map((v:any)=>{
return <li>{v.name}</li>
})
}
</ul>
</div>
)
}
}
```
同理可得,在`logic`中使用也是一样的!!
### 2.3:使用注意事项
**1** 项目中的路由使用的是`vue-router`,同时我借鉴了`Nuxt.js`的思想,自己开发了路由配置文件自动生成的插件,这个插件是`Vue-cli 3`的插件,所以不能在`Vue cli 2`的项目中使用!!
插件源码已经提交`npm`包市场!请完整阅读下面的插件文档,路由的配置文件让插件帮我们自动生成就好了!!!
[vue-cli-plugin-tsx-autorouter](https://www.npmjs.com/package/vue-cli-plugin-tsx-autorouter)
**2** 同时借鉴`PHP`开发框架`Laravel`开发终端命令行工具,通过命令帮我们创建带有模板代码能直接运行的文件!代码放在 `bin/` 文件夹中!
使用手册:
```bash
╭─bmy@MacBook-Pro /Applications/Source/TsxVueClassApi master*
╰─$ ./bin/tinit -h
Usage: tinit [options]
Options:
-t, --file-type <type> 文件类型: [pagelogicserviceimplless]
-n, --file-name <name> 被创建的文件名称
-i, --is-create <is> 是否为 -t 参数自动创建相关文件类型 (default: false)
-v, --version 显示当前的版本
-h, --help display help for command
```
参数说明:
- -t需要被创建的文件类型取值 pageTSX页面logicTSX页面的js抽象层service请求中间层的接口impl实现接口的类lesscss样式文件。可以多传
- -n需要被创建的文件名
- -i如果数值为true那么会自动创建 -t 参数所有的文件类型
使用案例:
```bash
╭─bmy@MacBook-Pro /Applications/Source/TsxVueClassApi master*
╰─$ ./bin/tinit -t page logic -n Test
成功创建文件...
```
上面命令执行后会分别在`src/application/page`中创建创建文件`Text.tsx`页面组件,同时在`src/application/logic/page`中创建`Test.logic.ts`的逻辑层文件。
多试几次,请自行熟练掌握!!
## 3开发中功能
- [ ] 【重要】1实现`ajax`请求到的数据和`model`层的映射绑定,这种数据绑定关系,可以完全解决后端改接口字段从而导致前端代码也需要同步大量修改的问题!!
- [ ] 【不太重要】1实时监听`configure.config.ts`配置文件,然后根据`ApiList`中的对象`key`名称自动在`service`层的类中生成对应的方法,降低手动复制的低效率!

View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

View File

@@ -0,0 +1 @@
7334c68c-3907-4f75-a38a-735928b20d52

View File

@@ -0,0 +1 @@
b99e8213-c9d7-4bee-80f2-23a898868d5a

View File

@@ -0,0 +1,101 @@
module.exports = {
pageConfig: (name) => {
return `
import "@pageLess/${name}.less";
import { Component, Vue } from 'vue-property-decorator';
import { ${name}Logic } from "@logic/page/${name}.logic";
import { Route, RawLocation } from 'vue-router';
import { BaseLayout, RouterMeta } from "@layout/base.layout";
import MainLayoutComponents from "@components/MainLayoutComponents";
@Component
export default class ${name} extends BaseLayout {
private service: ${name}Logic = new ${name}Logic(this);
private RouterMeta: RouterMeta = {
title: '${name}',
showNav: true,
isLogin: true
};
created() {
this.service.StartUp();
};
// 路由拦截器
beforeRouteEnter(to: Route, from: Route, next: (to?: RawLocation | false | ((vm: Vue) => void)) => void) {
next();
}
protected render() {
return (
<div class="${name}">
<MainLayoutComponents
title="${name}"
action={
<div>操作栏目</div>
}
content={
<div>内容栏目</div>
}>
</MainLayoutComponents>
</div>
)
}
}
`
},
logicConfig: (name) => {
return `
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class ${name}Logic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
}
}
`
},
serviceConfig: (name) => {
return `
export interface ${name}Service {
IndexClass(params: object): Promise<any>;
}
`
},
implPathConfig: (name) => {
return`
import { ${name}Service } from "@service/${name}.service";
import { Injectable } from "@ann/Ioc.annotation";
import { GET } from "@ann/Http.annotation";
@Injectable()
export class ${name}ServiceImpl implements ${name}Service {
@GET({ useHandle: false })
public async IndexClass(params: object): Promise<any> { }
}
`
},
lessConfig: (name) => {
return `
@import "../color/index";
@import "../mixin/index";
.${name} {
}
`
}
}

View File

@@ -0,0 +1,101 @@
#!/usr/bin/env node
const { program } = require('commander');
const packageConfig = require("../package.json");
const fs = require("fs");
const path = require('path');
const Config = require("./config");
program
.requiredOption('-t, --file-type <type>', '文件类型: [pagelogicserviceimplless]')
.option('-n, --file-name <name>', '被创建的文件名称')
.option('-i, --is-create <is>', '是否为 -t 参数自动创建相关文件类型', false);
program.version(packageConfig.version, '-v, --version', '显示当前的版本');
program.parse(process.argv);
// 存储终端的参数
let programOptions = program.opts();
let OtherFileType = program.parse(process.argv).args
// tsx 页面路径
let PagePath = pathJoin(`../src/application/page/${UpperCase(programOptions.fileName)}.tsx`);
// logic 页面路径
let LogicPath = pathJoin(`../src/application/logic/page/${UpperCase(programOptions.fileName)}.logic.ts`);
// service 页面路径
let ServicePath = pathJoin(`../src/core/service/${UpperCase(programOptions.fileName)}.service.ts`);
// Impl 页面路径
let ImplPath = pathJoin(`../src/core/service/impl/${UpperCase(programOptions.fileName)}.service.impl.ts`);
// Less 页面路径
let LessPath = pathJoin(`../src/application/assets/less/page/${UpperCase(programOptions.fileName)}.less`);
// 需要创建的文件类型
let FileList = ['page', 'logic', 'service', 'impl', 'less'];
// 是否需要为 controller 联合创建所有文件
if (programOptions.isCreate) {
FileList.forEach(val => replaceTplText(val));
console.log("成功创建文件...");
} else {
// 循环创建多个文件
if (OtherFileType.length !=0 ) {
[...OtherFileType, programOptions.fileType].forEach(v => replaceTplText(v))
} else {
replaceTplText(programOptions.fileType)
}
console.log("成功创建文件...");
}
/**
* 替换模板的内容,并将内容写入文件。
*/
let FileText = ""
function replaceTplText (action) {
switch (action) {
case 'page':
fs.writeFileSync(PagePath, Config.pageConfig(UpperCase(programOptions.fileName)));
break;
case 'logic':
fs.writeFileSync(LogicPath, Config.logicConfig(UpperCase(programOptions.fileName)));
break;
case 'service':
fs.writeFileSync(ServicePath, Config.serviceConfig(UpperCase(programOptions.fileName)));
break;
case 'impl':
fs.writeFileSync(ImplPath, Config.implPathConfig(UpperCase(programOptions.fileName)));
break;
case 'less':
fs.writeFileSync(LessPath, Config.lessConfig(UpperCase(programOptions.fileName)));
break;
default:
break
}
}
/**
* 单词首字母大写
* @param str
* @returns {void | string | *}
* @constructor
*/
function UpperCase (str) {
return str.replace(str[0],str[0].toUpperCase())
}
/**
* 读取文件内容
* @param path
* @returns {*}
* @constructor
*/
function GetFileText (path) {
return (fs.readFileSync( pathJoin(path), 'utf-8' )).toString();
}
/**
* 拼接路径
* @param paths
* @returns {string}
*/
function pathJoin (paths) {
return path.join(__dirname, paths)
}

View File

@@ -0,0 +1,2 @@
type Class<T> = new () => T
type VueComponent<Props> = Class<{ $props: Props | { props: Props } }>

View File

@@ -0,0 +1,25 @@
const gulp = require('gulp');
const exec = require('child_process').exec;
/**
* 执行 vue-cli-service route 命令进行路由编译
*/
gulp.task('AutoCompileRouter', function(cb) {
return exec('npm run route', (err, stdout, stderr) => {
if (err) {
console.log("编译失败: ", err);
cb(err)
} else {
console.log("编译成功");
}
});
});
/**
* 监听 page 所有文件的修改,自动触发 AutoCompileRouter 任务
*/
gulp.task('auto', function () {
gulp.watch('src/application/page/**/*', gulp.parallel('AutoCompileRouter'));
});
gulp.task('default', gulp.parallel('auto'));

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
{
"name": "vue2tsx",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "concurrently \"npm run route && npm run serve\" \"gulp\" ",
"serve": "cross-env NODE_ENV=dev vue-cli-service serve",
"build": "cross-env NODE_ENV=production vue-cli-service build",
"route": "vue-cli-service route"
},
"dependencies": {
"axios": "^0.20.0",
"babel-polyfill": "^6.26.0",
"core-js": "^3.6.5",
"cross-env": "^7.0.2",
"e-icon-picker": "^1.0.15",
"element-ui": "^2.13.2",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
"vue-property-decorator": "^8.4.2",
"vue-router": "^3.2.0",
"vuex": "^3.4.0",
"vuex-class": "^0.3.2"
},
"devDependencies": {
"@babel/generator": "^7.11.4",
"@babel/parser": "^7.11.4",
"@babel/types": "^7.11.0",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-typescript": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-polyfill": "^6.26.0",
"commander": "^6.1.0",
"compression-webpack-plugin": "^5.0.1",
"concurrently": "^5.3.0",
"glob": "^7.1.3",
"gulp": "^4.0.2",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"pify": "^4.0.1",
"reflect-metadata": "^0.1.13",
"typescript": "~3.9.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"vue-cli-plugin-tsx-autorouter": "^1.3.6",
"vue-template-compiler": "^2.6.11",
"webpack-bundle-analyzer": "^3.8.0"
}
}

View File

@@ -0,0 +1 @@
7b7212a6-f2b2-4393-824c-d7606833292f

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1 @@
d17d0e67-a59b-4b4a-b757-bf5a00dc152c

View File

@@ -0,0 +1 @@
2ddac08a-b407-4750-8d11-074d48e4504f

View File

@@ -0,0 +1,40 @@
import "@less/imports.less"
import { Component, Emit, PropSync, Vue, Watch } from 'vue-property-decorator';
import ElHeader from "@components/elementUi/ElHeader";
import ElAside from "@components/elementUi/ElAside";
import ElTabs from "@components/elementUi/ElTabs";
import { Getter, Mutation } from "vuex-class";
import { BaseLayout } from "@layout/base.layout";
@Component
export default class App extends BaseLayout {
@Getter('GettersTabsContentArr')
private TabsContent!: Array<any>;
mounted() { }
public MainLayout(): JSX.Element {
return (
<el-container>
<el-header>
<ElHeader></ElHeader>
</el-header>
<el-container class="mtop">
<el-aside width="200px">
<ElAside></ElAside>
</el-aside>
<ElTabs tabsData={this.TabsContent}/>
</el-container>
</el-container>
)
}
protected render() {
return (
<div id={"app"}>
{ this.$route.meta.showNav ? this.MainLayout() : <router-view key={this.$route.fullPath}/> }
</div>
)
}
}

View File

@@ -0,0 +1 @@
d76d71f8-fce0-441c-991a-280273dee10e

View File

@@ -0,0 +1 @@
f266b701-34d4-40ad-84ac-b7ae41dd99e8

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1 @@
6ba363bf-2490-4e11-bd1b-9459199a6ea8

View File

@@ -0,0 +1 @@
189170a8-a13d-49ae-b16e-1d9c8442a76d

View File

@@ -0,0 +1,309 @@
// 公共css样式可以在 页面组件中直接使用变量名称
// 具体看 components/home.styl
@theme-color: red;
@test-color: yellow;
@red50: #ffebee;
@red100: #ffcdd2;
@red200: #ef9a9a;
@red300: #e57373;
@red400: #ef5350;
@red500: #f44336;
@red600: #e53935;
@red700: #d32f2f;
@red800: #c62828;
@red900: #b71c1c;
@redA100: #ff8a80;
@redA200: #ff5252;
@redA400: #ff1744;
@redA700: #d50000;
@red: @red500;
@pink50: #fce4ec;
@pink100: #f8bbd0;
@pink200: #f48fb1;
@pink300: #f06292;
@pink400: #ec407a;
@pink500: #e91e63;
@pink600: #d81b60;
@pink700: #c2185b;
@pink800: #ad1457;
@pink900: #880e4f;
@pinkA100: #ff80ab;
@pinkA200: #ff4081;
@pinkA400: #f50057;
@pinkA700: #c51162;
@pink: @pink500;
@purple50: #f3e5f5;
@purple100: #e1bee7;
@purple200: #ce93d8;
@purple300: #ba68c8;
@purple400: #ab47bc;
@purple500: #9c27b0;
@purple600: #8e24aa;
@purple700: #7b1fa2;
@purple800: #6a1b9a;
@purple900: #4a148c;
@purpleA100: #ea80fc;
@purpleA200: #e040fb;
@purpleA400: #d500f9;
@purpleA700: #aa00ff;
@purple: @purple500;
@deepPurple50: #ede7f6;
@deepPurple100: #d1c4e9;
@deepPurple200: #b39ddb;
@deepPurple300: #9575cd;
@deepPurple400: #7e57c2;
@deepPurple500: #673ab7;
@deepPurple600: #5e35b1;
@deepPurple700: #512da8;
@deepPurple800: #4527a0;
@deepPurple900: #311b92;
@deepPurpleA100: #b388ff;
@deepPurpleA200: #7c4dff;
@deepPurpleA400: #651fff;
@deepPurpleA700: #6200ea;
@deepPurple: @deepPurple500;
@indigo50: #e8eaf6;
@indigo100: #c5cae9;
@indigo200: #9fa8da;
@indigo300: #7986cb;
@indigo400: #5c6bc0;
@indigo500: #3f51b5;
@indigo600: #3949ab;
@indigo700: #303f9f;
@indigo800: #283593;
@indigo900: #1a237e;
@indigoA100: #8c9eff;
@indigoA200: #536dfe;
@indigoA400: #3d5afe;
@indigoA700: #304ffe;
@indigo: @indigo500;
@blue50: #e3f2fd;
@blue100: #bbdefb;
@blue200: #90caf9;
@blue300: #64b5f6;
@blue400: #42a5f5;
@blue500: #2196f3;
@blue600: #1e88e5;
@blue700: #1976d2;
@blue800: #1565c0;
@blue900: #0d47a1;
@blueA100: #82b1ff;
@blueA200: #448aff;
@blueA400: #2979ff;
@blueA700: #2962ff;
@blue: @blue500;
@lightBlue50: #e1f5fe;
@lightBlue100: #b3e5fc;
@lightBlue200: #81d4fa;
@lightBlue300: #4fc3f7;
@lightBlue400: #29b6f6;
@lightBlue500: #03a9f4;
@lightBlue600: #039be5;
@lightBlue700: #0288d1;
@lightBlue800: #0277bd;
@lightBlue900: #01579b;
@lightBlueA100: #80d8ff;
@lightBlueA200: #40c4ff;
@lightBlueA400: #00b0ff;
@lightBlueA700: #0091ea;
@lightBlue: @lightBlue500;
@cyan50: #e0f7fa;
@cyan100: #b2ebf2;
@cyan200: #80deea;
@cyan300: #4dd0e1;
@cyan400: #26c6da;
@cyan500: #00bcd4;
@cyan600: #00acc1;
@cyan700: #0097a7;
@cyan800: #00838f;
@cyan900: #006064;
@cyanA100: #84ffff;
@cyanA200: #18ffff;
@cyanA400: #00e5ff;
@cyanA700: #00b8d4;
@cyan: @cyan500;
@teal50: #e0f2f1;
@teal100: #b2dfdb;
@teal200: #80cbc4;
@teal300: #4db6ac;
@teal400: #26a69a;
@teal500: #009688;
@teal600: #00897b;
@teal700: #00796b;
@teal800: #00695c;
@teal900: #004d40;
@tealA100: #a7ffeb;
@tealA200: #64ffda;
@tealA400: #1de9b6;
@tealA700: #00bfa5;
@teal: @teal500;
@green50: #e8f5e9;
@green100: #c8e6c9;
@green200: #a5d6a7;
@green300: #81c784;
@green400: #66bb6a;
@green500: #4caf50;
@green600: #43a047;
@green700: #388e3c;
@green800: #2e7d32;
@green900: #1b5e20;
@greenA100: #b9f6ca;
@greenA200: #69f0ae;
@greenA400: #00e676;
@greenA700: #00c853;
@green: @green500;
@lightGreen50: #f1f8e9;
@lightGreen100: #dcedc8;
@lightGreen200: #c5e1a5;
@lightGreen300: #aed581;
@lightGreen400: #9ccc65;
@lightGreen500: #8bc34a;
@lightGreen600: #7cb342;
@lightGreen700: #689f38;
@lightGreen800: #558b2f;
@lightGreen900: #33691e;
@lightGreenA100: #ccff90;
@lightGreenA200: #b2ff59;
@lightGreenA400: #76ff03;
@lightGreenA700: #64dd17;
@lightGreen: @lightGreen500;
@lime50: #f9fbe7;
@lime100: #f0f4c3;
@lime200: #e6ee9c;
@lime300: #dce775;
@lime400: #d4e157;
@lime500: #cddc39;
@lime600: #c0ca33;
@lime700: #afb42b;
@lime800: #9e9d24;
@lime900: #827717;
@limeA100: #f4ff81;
@limeA200: #eeff41;
@limeA400: #c6ff00;
@limeA700: #aeea00;
@lime: @lime500;
@yellow50: #fffde7;
@yellow100: #fff9c4;
@yellow200: #fff59d;
@yellow300: #fff176;
@yellow400: #ffee58;
@yellow500: #ffeb3b;
@yellow600: #fdd835;
@yellow700: #fbc02d;
@yellow800: #f9a825;
@yellow900: #f57f17;
@yellowA100: #ffff8d;
@yellowA200: #ffff00;
@yellowA400: #ffea00;
@yellowA700: #ffd600;
@yellow: @yellow500;
@amber50: #fff8e1;
@amber100: #ffecb3;
@amber200: #ffe082;
@amber300: #ffd54f;
@amber400: #ffca28;
@amber500: #ffc107;
@amber600: #ffb300;
@amber700: #ffa000;
@amber800: #ff8f00;
@amber900: #ff6f00;
@amberA100: #ffe57f;
@amberA200: #ffd740;
@amberA400: #ffc400;
@amberA700: #ffab00;
@amber: @amber500;
@orange50: #fff3e0;
@orange100: #ffe0b2;
@orange200: #ffcc80;
@orange300: #ffb74d;
@orange400: #ffa726;
@orange500: #ff9800;
@orange600: #fb8c00;
@orange700: #f57c00;
@orange800: #ef6c00;
@orange900: #e65100;
@orangeA100: #ffd180;
@orangeA200: #ffab40;
@orangeA400: #ff9100;
@orangeA700: #ff6d00;
@orange: @orange500;
@deepOrange50: #fbe9e7;
@deepOrange100: #ffccbc;
@deepOrange200: #ffab91;
@deepOrange300: #ff8a65;
@deepOrange400: #ff7043;
@deepOrange500: #ff5722;
@deepOrange600: #f4511e;
@deepOrange700: #e64a19;
@deepOrange800: #d84315;
@deepOrange900: #bf360c;
@deepOrangeA100: #ff9e80;
@deepOrangeA200: #ff6e40;
@deepOrangeA400: #ff3d00;
@deepOrangeA700: #dd2c00;
@deepOrange: @deepOrange500;
@brown50: #efebe9;
@brown100: #d7ccc8;
@brown200: #bcaaa4;
@brown300: #a1887f;
@brown400: #8d6e63;
@brown500: #795548;
@brown600: #6d4c41;
@brown700: #5d4037;
@brown800: #4e342e;
@brown900: #3e2723;
@brown: @brown500;
@blueGrey50: #eceff1;
@blueGrey100: #cfd8dc;
@blueGrey200: #b0bec5;
@blueGrey300: #90a4ae;
@blueGrey400: #78909c;
@blueGrey500: #607d8b;
@blueGrey600: #546e7a;
@blueGrey700: #455a64;
@blueGrey800: #37474f;
@blueGrey900: #263238;
@blueGrey: @blueGrey500;
@grey50: #fafafa;
@grey100: #f5f5f5;
@grey200: #eeeeee;
@grey300: #e0e0e0;
@grey400: #bdbdbd;
@grey500: #9e9e9e;
@grey600: #757575;
@grey700: #616161;
@grey800: #424242;
@grey900: #212121;
@grey: @grey500;
@black: #000000;
@white: #ffffff;
@transparent: rgba(0, 0, 0, 0);
@fullBlack: rgba(0, 0, 0, 1);
@darkBlack: rgba(0, 0, 0, 0.87);
@lightBlack: rgba(0, 0, 0, 0.54);
@minBlack: rgba(0, 0, 0, 0.26);
@faintBlack: rgba(0, 0, 0, 0.12);
@fullWhite: rgba(255, 255, 255, 1);
@darkWhite: rgba(255, 255, 255, 0.87);
@lightWhite: rgba(255, 255, 255, 0.54);

View File

@@ -0,0 +1 @@
69c85fea-5dd1-4cd9-b452-3c0edcd94982

View File

@@ -0,0 +1,479 @@
.searchKey {
margin-bottom: 20px;
.el-select {
margin-right: 5px;
}
.searchKeyItem {
display: inline-block;
margin-right: 10px;
}
}
.FontActive {
background: #409eff !important;
color: #fff!important;
}
html,body, #app{
width: 100%;
height: 100%;
}
h1,h2,h3,h4,h5,h6,p,ul,li {
margin: 0;
padding: 0;
}
html {
font-family: sans-serif; /* 1 */
line-height: 1.15; /* 2 */
-ms-text-size-adjust: 100%; /* 3 */
-webkit-text-size-adjust: 100%; /* 3 */
}
body {
line-height: 1.5;
font-size: 16px;
width: 100%;
-webkit-tap-highlight-color:rgba(0, 0, 0, 0);
background-color: #fafafa;
color: rgba(0, 0, 0, 0.87);
margin: 0;
}
li {
list-style: none;
}
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main { /* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
white-space: pre-wrap;
word-break: break-all;
margin: 0;
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
text-decoration: none;
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
user-select: none;
-webkit-user-select: none;
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: sans-serif; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
resize: vertical;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details, /* 1 */
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}

View File

@@ -0,0 +1,16 @@
@vm_fontsize: 75;
@vm_design: 750;
.rem(@px) {
@result: (@px / @vm_fontsize ) * 1rem;
}
html {
font-size: (@vm_fontsize / (@vm_design / 2) ) * 100vw;
@media screen and (max-width: 320px) {
font-size: 64px;
}
@media screen and (min-width: 540px) {
font-size: 108px;
}
}

View File

@@ -0,0 +1,52 @@
// 重置ui框架css
.el-container,
.el-menu-vertical{
height: 100%;
}
.LoginFather .el-button {
width: 300px;
}
.el-row {
margin-left: 0px !important;
margin-right: 0px !important;
}
.mtop {
margin-top: 60px;
}
.el-header {
padding: 0 !important;
position: fixed;
width: 100%;
z-index: 999;
}
.v-modal {
z-index: 320 !important;
}
.el-main {
margin-top: 15px;
margin-left: 15px;
background: #fff;
}
.el-tabs__header {
background: #fff;
}
.el-aside {
position: fixed;
height: 100%;
z-index: 99;
}
.ElTabs {
padding-left: 200px;
box-sizing: border-box;
}
.topMenu {
width: 100%;
}
.el-tree-node__expand-icon{
font-size: 16px !important;
color: #848484 !important;
}
.el-tree-node__label {
font-size: 16px !important;
}

View File

@@ -0,0 +1 @@
4428c8fd-5e21-435d-b5b3-553050ac470a

View File

@@ -0,0 +1,57 @@
.ElTabs {
width: 100%;
.TabsFather {
overflow-x: scroll;
width: calc(100% - 200px);
position: fixed;
z-index: 101;
white-space: normal;
overflow-y: hidden;
.TabsTitle {
display: flex;
height: 45px;
line-height: 45px;
background: #fff;
border-bottom: 1px solid #dcdfe5;
.active {
background: #fff;
border-bottom: none !important;
i, span {
color: #409eff !important;
}
}
li {
flex-shrink: 0;
background-color: #fff;
padding: 0 20px;
border-left: 1px solid #e4e7ed;
cursor: pointer;
&:hover {
i, span {
font-size: 15px;
}
}
&:last-child {
border-right: 1px solid #e4e7ed;
}
i {
margin-right: 5px;
transition: all 0.1s;
}
span {
font-size: 14px;
font-weight: 500;
color: #303133;
transition: all 0.3s;
}
.el-icon-close {
margin-left: 8px;
font-size: 12px;
}
}
}
}
.TabsContent {
margin-top: 60px;
}
}

View File

@@ -0,0 +1,14 @@
@import "../color/index";
@import "../mixin/index";
.PageTemplate {
p {
font-size: 22px;
margin-bottom: 15px;
padding-bottom: 5px;
border-bottom: 1px solid #dcdfe6;
}
.Action {
margin-bottom: 15px;
}
}

View File

@@ -0,0 +1,10 @@
// 公共css
@import "./common/normalize";
@import "./common/rem";
@import "./common/resetUi";
// 颜色配置
@import "./color/index";
// 公共css 方法
@import "./mixin/index";

View File

@@ -0,0 +1 @@
f96d8b31-8668-4d5e-a449-2fe94e72693a

View File

@@ -0,0 +1,285 @@
.flex{
display: flex;
}
.align_items{
align-items: center
}
.left {
float: left;
}
.clearfix() {
&:after,
&:before {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
.hairline(@position, @color) when (@position = top) {
&:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: auto;
right: auto;
height: 1px;
width: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(50% 0%);
html.pixel-ratio-2 & {
.transform(scaleY(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleY(0.33));
}
}
}
.hairline(@position, @color) when (@position = left) {
&:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: auto;
right: auto;
width: 1px;
height: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(0% 50%);
html.pixel-ratio-2 & {
.transform(scaleX(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleX(0.33));
}
}
}
.hairline(@position, @color) when (@position = bottom) {
&:after {
content: '';
position: absolute;
left: 0;
bottom: 0;
right: auto;
top: auto;
height: 1px;
width: 100%;
background-color: @color;
display: block;
z-index: 15;
html.pixel-ratio-2 & {
.transform(scaleY(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleY(0.33));
}
}
}
.hairline(@position, @color) when (@position = right) {
&:after {
content: '';
position: absolute;
right: 0;
top: 0;
left: auto;
bottom: auto;
width: 1px;
height: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(100% 50%);
html.pixel-ratio-2 & {
.transform(scaleX(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleX(0.33));
}
}
}
// For right and bottom
.hairline-remove(@position) when not (@position = left) and not (@position = top) {
&:after {
display: none;
}
}
// For left and top
.hairline-remove(@position) when not (@position = right) and not (@position = bottom) {
&:before {
display: none;
}
}
// For right and bottom
.hairline-color(@position, @color) when not (@position = left) and not (@position = top) {
&:after {
background-color: @color;
}
}
// For left and top
.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) {
&:before {
background-color: @color;
}
}
// Encoded SVG Background
.encoded-svg-background(@svg) {
@url: `encodeURIComponent(@{svg})`;
background-image: url("data:image/svg+xml;charset=utf-8,@{url}");
}
// Preserve3D
.preserve3d() {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
// Shadow
.depth(@level:1) {
& when (@level = 0) {
box-shadow: none;
}
& when (@level = 1) {
box-shadow: 0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);
}
& when (@level = 2) {
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);
}
& when (@level = 3) {
box-shadow: 0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);
}
& when (@level = 4) {
box-shadow: 0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);
}
& when (@level = 5) {
box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12);
}
& when (@level = 6) {
box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);
}
& when (@level = 7) {
box-shadow: 0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);
}
& when (@level = 8) {
box-shadow: 0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);
}
& when (@level = 9) {
box-shadow: 0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12);
}
& when (@level = 10) {
box-shadow: 0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12);
}
& when (@level = 11) {
box-shadow: 0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12);
}
& when (@level = 12) {
box-shadow: 0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12);
}
& when (@level = 13) {
box-shadow: 0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12);
}
& when (@level = 14) {
box-shadow: 0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12);
}
& when (@level = 15) {
box-shadow: 0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12);
}
& when (@level = 16) {
box-shadow: 0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);
}
& when (@level = 17) {
box-shadow: 0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12);
}
& when (@level = 18) {
box-shadow: 0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12);
}
& when (@level = 19) {
box-shadow: 0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12);
}
& when (@level = 20) {
box-shadow: 0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12);
}
& when (@level = 21) {
box-shadow: 0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12);
}
& when (@level = 22) {
box-shadow: 0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12);
}
& when (@level = 23) {
box-shadow: 0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12);
}
& when (@level = 24) {
box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);
}
// & when (@level = 1) {
// box-shadow: rgba(0, 0, 0, 0.117647) 0px 1px 6px, rgba(0, 0, 0, 0.117647) 0px 1px 4px;
// }
// & when (@level = 2) {
// box-shadow: rgba(0, 0, 0, 0.156863) 0px 3px 10px, rgba(0, 0, 0, 0.227451) 0px 3px 10px;
// }
// & when (@level = 3) {
// box-shadow: rgba(0, 0, 0, 0.188235) 0px 10px 30px, rgba(0, 0, 0, 0.227451) 0px 6px 10px;
// }
// & when (@level = 4) {
// box-shadow: rgba(0, 0, 0, 0.247059) 0px 14px 45px, rgba(0, 0, 0, 0.219608) 0px 10px 18px;
// }
// & when (@level = 5) {
// box-shadow: rgba(0, 0, 0, 0.298039) 0px 19px 60px, rgba(0, 0, 0, 0.219608) 0px 15px 20px;
// }
}
// Highlighted Links
.active-highlight(@color:rgba(255, 255, 255, 0.15)){
&:before {
content: '';
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background-color: @color;
background-repeat: no-repeat;
background-position: center;
background-size: 100% 100%;
opacity: 0;
pointer-events: none;
.transition(600ms);
}
&.active-state:before,
html:not(.watch-active-state) &:active:before {
opacity: 1;
.transition(150ms);
}
}
.active-highlight-color(@color) {
&:before {
background-image: -webkit-radial-gradient(center, circle cover, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%);
background-image: radial-gradient(circle at center, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%);
}
}
// No Scrollbar
.no-scrollbar() {
&::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
opacity: 0 !important;
}
}
.ellipsis() {
white-space:nowrap;
text-overflow:ellipsis;
overflow:hidden;
word-wrap: break-word;
}

View File

@@ -0,0 +1 @@
4ba952a2-440a-4dbc-9864-98fa0bd5c038

View File

@@ -0,0 +1,5 @@
@import "../color/index";
@import "../mixin/index";
.ApprovalManagementList {
}

View File

@@ -0,0 +1,5 @@
@import "../color/index";
@import "../mixin/index";
.BusinessManagementList {
}

View File

@@ -0,0 +1,22 @@
@import "../color/index";
@import "../mixin/index";
.CompanyDetail {
.text {
color: @grey600;
font-size: 14px;
margin-bottom: 8px;
}
.TabsConent {
padding-top: 20px;
.item {
margin-bottom: 32px;
.itemTitle {
margin-bottom: 20px;
font-size: 16px;
color: #000;
font-weight: bold;
}
}
}
}

View File

@@ -0,0 +1,5 @@
@import "../color/index";
@import "../mixin/index";
.FinancialManagement {
}

View File

@@ -0,0 +1,39 @@
@import "../color/index";
@import "../mixin/index";
.GuaranteeManagement {
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 90px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 50%;
}a
.action {
height: 50px;
span {
margin-right: 5px;
height: 40px;
line-height: 30px;
box-sizing: border-box;
border-radius: 5px;
margin-bottom: 7px;
}
}
.searchKey {
margin-bottom: 20px;
overflow: hidden;
.el-select {
margin-right: 5px;
}
.searchKeyItem {
float: left;
margin-right: 10px;
}
}
}

View File

@@ -0,0 +1,54 @@
@import "../color/index";
.home {
height: 100%;
display: flex;
flex-direction: column;
.Statistics{
flex: 1;
margin-right: 10px;
&:last-child{
margin-right: 0;
}
.StatisticsItem{
text-align: center;
cursor: pointer;
.StatisticsItemIcon{
font-size: 28px;
}
.StatisticsItemNum{
font-size: 16px;
margin: 5px 0;
}
}
}
.mt10{
margin-top: 10px;
}
.mr10{
margin-right: 10px;
}
.flex1{
flex: 1;
}
.welcome{
height: 250px;
}
.Matters{
width: 500px;
height: 250px;
display: flex;
flex-direction: column;
.MattersList{
flex: 1;
margin-bottom: 20px;
overflow-y: scroll;
.MattersText {
font-size: 14px;
}
.MattersItem {
margin-bottom: 10px;
}
}
}
}

View File

@@ -0,0 +1,30 @@
@import "../color/index";
@import "../mixin/index";
.InformationFlow {
.table_title {
width: 100%;
overflow: hidden;
margin-top: 17px;
border-bottom: 1px solid #dcdfe5;
padding-bottom: 10px;
}
.table_content {
.content_item {
margin-top: 15px;
}
}
.title_item,
.content_item{
height: 45px;
line-height: 45px;
float: left;
width: 14%;
text-align: center;
}
i {
font-size: 25px;
cursor: pointer;
font-weight: bolder;
}
}

View File

@@ -0,0 +1,6 @@
@import "../color/index";
@import "../mixin/index";
.InvoiceList {
}

View File

@@ -0,0 +1,46 @@
@import "../color/index";
@import "../mixin/index";
.Login {
position: relative;
width: 100%;
height: 100%;
.LoginFrom {
position: absolute;
left: 50%;
top: 50%;
width: 800px;
height: 350px;
margin-top: -200px;
margin-left: -400px;
box-shadow: 0 10px 20px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
border-radius: 4px;
img {
width: 60%;
height: 100%;
.left()
}
.InputFrom {
.left();
width: 40%;
padding: 15px;
box-sizing: border-box;
.el-input__inner {
border-radius: 100px;
}
p {
font-size: 24px;
color: #4a5761;
margin-bottom: 20px;
}
.el-input {
margin-bottom: 15px;
}
.SubmitLogin {
width: 100px;
border-radius: 100px;
margin-right: 10px;
}
}
}
}

View File

@@ -0,0 +1,6 @@
@import "../color/index";
@import "../mixin/index";
.LoginLog {
}

View File

@@ -0,0 +1,11 @@
@import "../color/index";
@import "../mixin/index";
.MenuConfig {
.el-tag--plain {
cursor: pointer !important;
}
.active {
background: #409eff !important;
color: #fff !important;
}
}

View File

@@ -0,0 +1,6 @@
@import "../color/index";
@import "../mixin/index";
.OperationLog {
}

View File

@@ -0,0 +1,6 @@
@import "../color/index";
@import "../mixin/index";
.OrderManagementList {
}

View File

@@ -0,0 +1,35 @@
@import "../color/index";
@import "../mixin/index";
.ReviewedTemplate {
.TemplateList {
position: relative;
width: 300px;
background: #ecf5ff;
border-radius: 4px;
border: 1px solid #d9ecff;
margin-bottom: 19px;
.title {
text-align: center;
color: #409eff;
padding: 10px;
}
.action {
position: absolute;
right: -40px;
top: -3px;
i {
width: 100%;
cursor: pointer;
color: #ada9a9;
&:hover {
color: #2b2b2b;
}
&:last-child {
margin-bottom: 0 !important;
}
}
}
}
}

View File

@@ -0,0 +1,5 @@
@import "../color/index";
@import "../mixin/index";
.RiskManagementList {
}

View File

@@ -0,0 +1,63 @@
@import "../color/index";
@import "../mixin/index";
.RoleList {
.list {
.active {
.titleCheckbox {
background: #409eff !important;
}
}
.noChooise {
cursor: not-allowed;
.titleCheckbox {
cursor: not-allowed;
}
.titleText {
color: #c0c4cc;
cursor: not-allowed;
}
}
.titleLeft {
display: flex;
align-items: center;
cursor: pointer;
.titleCheckbox {
width: 13px;
height: 13px;
border: 1px solid #dcdfe6;
margin-right: 5px;
border-radius: 4px;
}
.titleText {
font-size: 15px;
}
}
.itme {
overflow: hidden;
margin-bottom: 20px;
.itemTitle {
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
background: #f9f9f9;
margin-bottom: 10px;
}
.itemContent {
padding-left: 20px;
.childrenThree {
margin-left: 30px;
margin-top: 7px;
.titleLeft {
margin-bottom: 3px;
float: left;
margin-right: 15px;
}
}
}
}
}
}

View File

@@ -0,0 +1,6 @@
@import "../color/index";
@import "../mixin/index";
.SystemConfiguration {
}

View File

@@ -0,0 +1,42 @@
@import "../color/index";
@import "../mixin/index";
.ToBeReviewedInfo {
.text {
color: rgba(0,0,0,.85);
font-size: 14px;
margin-bottom: 8px;
.el-button--small {
}
}
.TBInfoContent {
.TBInfoContentHeader {
margin-bottom: 20px;
.tipsText {
margin-bottom: 4px;
color: rgba(0,0,0,.45);
font-size: 14px;
}
.tipA {
color: rgba(0,0,0,.85);
font-size: 24px;
font-weight: 400;
}
}
.TBInfoContentTabs {
.TabsConent {
padding-top: 20px;
.item {
margin-bottom: 32px;
.itemTitle {
margin-bottom: 20px;
font-size: 16px;
color: rgba(0,0,0,.85);
font-weight: 500;
}
}
}
}
}
}

View File

@@ -0,0 +1,27 @@
@import "../color/index";
@import "../mixin/index";
.ToBeReviewedList {
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 90px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 50%;
}a
.action {
height: 50px;
span {
margin-right: 5px;
height: 40px;
line-height: 30px;
box-sizing: border-box;
border-radius: 5px;
margin-bottom: 7px;
}
}
}

View File

@@ -0,0 +1,17 @@
@import "../color/index";
@import "../mixin/index";
.userRow{
padding: 15px 0;
margin-left: 30px;
.userLabel{
width: 200px;
font-size: 16px;
font-weight: bold;
color: @grey900;
}
.userValue{
font-size: 16px;
color: @grey800;
}
}

View File

@@ -0,0 +1,7 @@
.Error {
margin-top: 30px;
text-align: center;
.icon {
margin-bottom: 20px;
}
}

View File

@@ -0,0 +1,8 @@
@import "../color/index";
@import "../mixin/index";
.wardenList {
h1 {
color: @theme-color;
}
}

View File

@@ -0,0 +1 @@
574674e1-431e-40bf-be5b-367d5e371721

View File

@@ -0,0 +1,24 @@
import { Component, Vue, Prop } from 'vue-property-decorator';
@Component
export default class HelloWorld extends Vue {
@Prop({ default: 'default value' }) public readonly msg!: string;
private mounted() {
// console.log(...this.$slots.default)
}
private showAlert() {
alert("showAlert")
}
private render() {
return (
<div class="hello">
<h1>{this.msg}</h1>
{this.$slots.default}
<h2 onclick={()=>this.showAlert()}>HelloWorld组件点击事件{this.msg}</h2>
</div>
)
}
}

View File

@@ -0,0 +1,35 @@
import "@lessCom/PageTemplate.less";
import { Component, Prop, Vue } from "vue-property-decorator";
import { BaseLayout, RouterMeta } from "@layout/base.layout";
@Component
export default class MainLayoutComponents extends BaseLayout {
@Prop() public readonly title!: string | JSX.Element;
@Prop() public readonly action!: JSX.Element;
@Prop() public readonly content!: JSX.Element;
render() {
return (
<div class="PageTemplate">
<el-row gutter={24}>
<el-col span={24}>
<p>{this.title}</p>
</el-col>
</el-row>
<el-row gutter={24} class="Action">
<el-col span={24}>
{this.action}
</el-col>
</el-row>
<el-row gutter={24}>
<el-col span={24}>
{this.content}
</el-col>
</el-row>
</div>
)
}
}

View File

@@ -0,0 +1 @@
337954b3-df74-46d7-8f4a-484eb02f1372

View File

@@ -0,0 +1,63 @@
import { Component, Vue } from "vue-property-decorator";
import { Getter, Mutation } from "vuex-class";
@Component
export default class ElAside extends Vue {
@Getter('GettersAsideMenu') private readonly AsideMenu!: Array<any>
@Getter('GettersTabsActive') private readonly TabsActive!: Array<any>
@Mutation('SET_TABCONTENT') private SetContent!: any;
@Mutation('SET_TABACTIVE') private SetActive!: any;
private OpenMenu(key: string, keyPath: string): void {
this.SetContent(key);
this.SetActive(key);
this.$router.push(key)
}
mounted() {
// 刷新后获取当前路由地址然后激活对应菜单
this.SetActive(this.$route.path)
}
render() {
return (
<el-menu
defaultActive={this.TabsActive}
class="el-menu-vertical"
unique-opened={true}
on-select={this.OpenMenu}>
{
this.AsideMenu.map((v,i)=>{
return v.children.length == 0
? (
<el-menu-item index={v.web_href}>
<i class={v.icon}></i>
<span slot="title">{v.label}</span>
</el-menu-item>
)
: (
<el-submenu index={v.web_href}>
<template slot="title">
<i class={v.icon}></i>
<span>{v.label}</span>
</template>
<el-menu-item-group>
{
v.children.map((t:any,j:number) => {
return (
<el-menu-item index={t.web_href}>
<i class={t.icon}></i>
<span>{t.label}</span>
</el-menu-item>
)
})
}
</el-menu-item-group>
</el-submenu>
)
})
}
</el-menu>
)
}
}

View File

@@ -0,0 +1,117 @@
import {Component, Vue} from "vue-property-decorator";
import {KeyParams} from "@logic/Base.logic";
import {Notification} from "element-ui";
import { UserServiceImpl } from "@impl/User.service.impl";
import { PublicServiceImpl } from "@impl/Public.service.impl";
@Component
export default class ElHeader extends Vue {
private UserServiceImpl: UserServiceImpl = new UserServiceImpl();
private PublicServiceImpl: PublicServiceImpl = new PublicServiceImpl();
public defaultActive: string = '';
// 控制修改密码弹窗是否显示
public isShowChangePassword: Boolean = false;
// 修改密码的接口参数
public ruleForm: KeyParams = {
origin_password: '', password: ''
} ;
// 保存用户基本信息
public SaveUserInfo: KeyParams = {
username: ''
};
public async created() {
await this.GetUserInfoRequest()
}
public async GetUserInfoRequest() {
this.SaveUserInfo = await this.UserServiceImpl.GetUserInfo({});
}
/**
* 修改密码
*/
public async changePassword(): Promise<any> {
if (this.ruleForm.origin_password.length == 0) {
Notification.error("原密码不能为空")
return false
}
if (this.ruleForm.password.length == 0) {
Notification.error("新密码不能为空")
return false
}
let res = await this.UserServiceImpl.SetPassword(this.ruleForm);
}
public changePasswordPopup(): JSX.Element {
return (
<el-dialog
title="修改密码"
destroy-on-close={true}
show-close={false}
visible={this.isShowChangePassword}
width="30%">
<el-input type="text" v-model={this.ruleForm.origin_password} style={{ 'margin-bottom': '10px' }} placeholder="请输入原密码"></el-input>
<el-input type="password" v-model={this.ruleForm.password} style={{ 'margin-bottom': '10px' }} placeholder="请输入新密码"></el-input>
<span slot="footer" class="dialog-footer">
<el-button on-click={()=>{this.isShowChangePassword = false}}> </el-button>
<el-button type="primary" on-click={()=> this.changePassword() }> </el-button>
</span>
</el-dialog>
)
}
render() {
return (
<el-menu
defaultActive={this.defaultActive}
className="el-menu-demo"
mode="horizontal"
on-select={() => {}}
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b">
<el-menu-item> </el-menu-item>
<el-submenu index="3" style={{ float: 'right' }}>
<template slot="title">
<i class="el-icon-user-solid"></i>
{this.SaveUserInfo.username}
</template>
<el-menu-item index="3-1" on-click={()=>{
this.isShowChangePassword = true
}}>
<i class="el-icon-edit"></i>
<span slot="title"></span>
</el-menu-item>
<el-menu-item index="3-3" on-click={()=>{this.$router.push('/UserInfo')}}>
<i class="el-icon-notebook-2"></i>
<span slot="title"></span>
</el-menu-item>
<el-menu-item index="3-2" on-click={()=>{
this.$confirm('确定退出当前后台吗?', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
localStorage.clear()
setTimeout(()=>{
// location.href = "#/User/Login"
this.$router.replace('/User/Login')
},300)
}).catch(() => {});
}}>
<i class="el-icon-switch-button"></i>
<span slot="title">退</span>
</el-menu-item>
</el-submenu>
{this.changePasswordPopup()}
</el-menu>
)
}
}

View File

@@ -0,0 +1,75 @@
import "@lessCom/ElTabs.less"
import {Component, Prop, Vue} from "vue-property-decorator";
import {Mutation} from "vuex-class";
@Component
export default class ElTabs extends Vue {
@Prop({ default: [] }) public readonly tabsData!: Array<any>;
@Mutation('SET_TABACTIVE')
private SetActive!: any;
@Mutation('SET_REMOVETABS')
private RemoveTab!: any;
/**
* 会导致 Computed property was assigned to but it has no setter.
* 所以需要使用computed重写setter即可
* @constructor
*/
get TabsActive() {
return this.$store.getters.GettersTabsActive
}
set TabsActive(val) {}
/**
* 删除tabs
* @param targetName
*/
public async removeTab(targetName: string): Promise<void> {
this.RemoveTab(targetName)
await this.$router.push(this.TabsActive)
}
mounted() { }
render() {
return (
<div class="ElTabs">
<div class="TabsFather">
<ul class="TabsTitle">
{
this.tabsData.map((v,index)=>{
return (
<li class={v.url == this.TabsActive ? 'active': ''}
on-click={async ()=> {
this.SetActive(v.url)
await this.$router.push(v.url)
}}>
<i class={v.icon}></i>
<span>{v.title}</span>
{
v.closable
? <i class="el-icon-close" on-click={async (e:Event)=>{
e.stopPropagation()
await this.removeTab(v.url)
}}>
</i>
: null
}
</li>
)
})
}
</ul>
</div>
<div class="TabsContent">
<el-main>
<router-view/>
</el-main>
</div>
</div>
)
}
}

View File

@@ -0,0 +1 @@
789a6b3e-8098-4264-8f25-ce1c3f495ef2

View File

@@ -0,0 +1,17 @@
import { Component, Vue } from 'vue-property-decorator';
export interface RouterMeta {
title?: string,
isLogin?: boolean,
showNav?: boolean
}
/**
* 所有页面公共参数和方法的地方
*/
export class BaseLayout extends Vue {
protected RenderRow: any;
protected $formatDate!: (data: any) => string;
protected $conversionMoney!: (m: number) => string;
protected $DateToString!: (date: Date, fmt?: string) => string;
}

View File

@@ -0,0 +1 @@
b70a8613-ce20-446b-8777-b54febc23699

View File

@@ -0,0 +1,68 @@
import {Vue} from "vue-property-decorator";
import { Inject } from "@ann/Ioc.annotation";
import { DepartmentServiceImpl } from "@impl/Department.service.impl";
import { UserServiceImpl } from "@impl/User.service.impl";
export interface KeyParams {
[ key: string ] : any
}
// VueType 继承 Vue实现对全局方法的类型定义
export interface VueType extends Vue {
$setToken: (token: string) => void
$formatDate: (data: number) => string
$isLogin: () => void
$DateToString: (date: Date, fmt?: string) => string
SetLeftMenu: (arg: any)=> any;
}
export interface Methods {
StartUp(): Promise<void>;
}
/**
* 基础逻辑父类
*/
export class BaseLogic {
@Inject()
public readonly DepartmentServiceImpl!: DepartmentServiceImpl;
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
// 保存table点击后的那行对象
public clickCurrent!: KeyParams;
// 保存Vue对象
protected VueApp!: VueType;
// $refs 类型
protected $refs!: any;
protected $confirm!: any;
protected $message!: any;
// 请求的总页数
public TotalCount!: string;
// 请求参数
protected PageParams: { limit: number, page: number } = {
limit: 10, page: 1
}
// 保存部门列表的数据
public DepartmentList: KeyParams[] = [];
public DepartRoleList: KeyParams[] = [];
public SaveUserInfo: KeyParams = {};
/**
* 【公共多次被用到的接口】获取部门列表
* @constructor
*/
public async DepartmentListRequest(): Promise<void> {
this.DepartmentList = await this.DepartmentServiceImpl.DepartmentList({});
}
public async GetDepartRole(params:Object = {}): Promise<void> {
this.DepartRoleList = await this.DepartmentServiceImpl.GetDepartRole(params);
}
public async GetUserInfo() {
this.SaveUserInfo = await this.UserServiceImpl.GetUserInfo({});
}
}

View File

@@ -0,0 +1 @@
6d4ecf88-b978-4876-b909-90088349edaf

View File

@@ -0,0 +1,21 @@
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class ApprovalManagementListLogic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
}
}

View File

@@ -0,0 +1,100 @@
import {BaseLogic, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { RoleServiceImpl } from "@impl/Role.service.impl";
export class BackEndMenuConfigLogic extends BaseLogic implements Methods {
@Inject()
public readonly RoleServiceImpl!: RoleServiceImpl;
// 保存后端权限列表数据
public BackEndMenuList: KeyParams[] = [];
// 控制添加后端权限的弹窗是否显示
public isShowDialog: boolean = false;
// 添加后端权限的弹窗
public setRuleBackEnd: KeyParams = {
id: '', // 权限ID0或空为新增
pid: '', // 父级ID0=顶级权限
auth_title: '', // 权限名称
auth_path: '', // 权限路径
status: '', // 状态,-9=禁用9=启用默认9
}
public statusText: boolean = true;
public SelectText: [] = [];
public simpleList: KeyParams[] = []
// false 添加true 编辑
public ApiStatus: boolean = false;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.AuthRuleGetList()
await this.ParentAccessList()
}
/**
* 上级权限 选择的事件
* @constructor
*/
public BackEndMenuListChange(v: string) {
console.log(v)
this.setRuleBackEnd.pid = v
}
/**
* 后端的权限列表
* @constructor
*/
public async AuthRuleGetList(): Promise<void> {
this.BackEndMenuList = await this.RoleServiceImpl.AuthRuleGetList({})
}
/**
* 获取后端简单权限列表
* @constructor
*/
public async ParentAccessList(): Promise<void> {
this.simpleList = await this.RoleServiceImpl.GetParentAccessList({
mode: 'set'
});
this.simpleList.push({
id: 0,
pid: 0,
value: 0,
label: '顶级权限',
auth_title: '顶级权限'
})
console.log("获取后端简单权限列表 ======> : ", this.simpleList)
}
/**
* 设置后端权限
*/
public async setRule(): Promise<void> {
this.setRuleBackEnd.id = 0;
// console.log(this.setRuleBackEnd)
await this.RoleServiceImpl.setRule(this.setRuleBackEnd);
this.isShowDialog = false;
await this.AuthRuleGetList()
}
/**
* 编辑后端权限
* @constructor
*/
public async EditRule(): Promise<void> {
await this.RoleServiceImpl.editRule(this.setRuleBackEnd)
this.isShowDialog = false;
await this.AuthRuleGetList()
}
}

View File

@@ -0,0 +1,148 @@
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
import { CompanySerivceImpl } from '@/core/service/impl/Company.serivce.impl';
import { IndexUtils } from '@/core/utils/index.utils';
export interface BidderCompanyParam {
text_field: string
text_value: string
status: string
date_field: string
date_range: any[] | string
page: number
limit: number
}
export interface BidderList {
id: number
cellphone: string
status: number
reg_ip: {
ip: string
country: string
province: string
city: string
county: string
isp: string
area: string
},
last_login_ip: {
ip: string
country: string
province: string
city: string
county: string
isp: string
area: string
},
last_login_time: number
create_time: number
reg_ip_text: string
last_login_ip_text: string
}
export class BidderListLogic extends BaseLogic implements Methods {
@Inject()
private IndexUtils!: IndexUtils;
@Inject()
private readonly CompanySerivceImpl!: CompanySerivceImpl;
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
this.GetBidderList()
}
/**
* 时间选择
*/
public dateFieldList = [
{
value: 'create_time',
label: '注册时间'
}, {
value: 'last_login_time',
label: '最后登录时间'
}
]
/**
* 当前状态
*/
public statusList = [
{
value: '0',
label: '禁用'
}, {
value: '1',
label: '启用'
}
]
public companyParam: BidderCompanyParam = {
text_field: 'cellphone',
text_value: '',
status: '',
date_field: 'create_time',
date_range: [],
page: 1,
limit: 10
}
public list: DataFormat<BidderList[]> = {
count: 0,
list: []
}
async GetBidderList() {
let companyParam: BidderCompanyParam = JSON.parse(JSON.stringify(this.companyParam))
if (typeof companyParam.date_range !== 'string' && companyParam.date_range !== null && companyParam.date_range.length > 0) {
companyParam.date_range = `${this.IndexUtils.DateToString(this.companyParam.date_range[0])} - ${this.IndexUtils.DateToString(this.companyParam.date_range[1])}`
}
let res = await this.CompanySerivceImpl.GetBidderList(companyParam)
if (res) {
this.list = res
}
}
public async BidderUserEnable(id: string) {
this.VueApp.$confirm('确认启用此账号吗?', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
await this.UserServiceImpl.BidderUserEnable({
id: id
});
await this.GetBidderList()
});
}
async bidderForbidden(id: string) {
this.VueApp.$confirm('是否禁用当前用户?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
await this.CompanySerivceImpl.bidderForbidden({
id: id
})
await this.GetBidderList()
}).catch(() => {
});
}
}

View File

@@ -0,0 +1,21 @@
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class BusinessManagementListLogic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
}
}

View File

@@ -0,0 +1,83 @@
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
import { CompanySerivceImpl } from '@/core/service/impl/Company.serivce.impl';
export interface CompanyDetail {
id: number
bidder_id: number
name: string
credit_code: string
tax_number: string
organization_code: string
business_term: number
reg_address: string
legal_name: string
legal_cellphone: string
id_card_num: string
telnum: string
bank: string
bank_num: string
front_image_id: number
bank_image_id: number
business_license: number
create_time: number
update_time: number
delete_time: number
front_image: string
bank_image: string
license_image: string
}
export class CompanyDetailLogic extends BaseLogic implements Methods {
@Inject()
public readonly CompanySerivceImpl!: CompanySerivceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
this.GetcompanyDetail()
}
public companyDetail: CompanyDetail = {
id: 0,
bidder_id: 0,
name: "",
credit_code: "",
tax_number: "",
organization_code: "",
business_term: 0,
reg_address: "",
legal_name: "",
legal_cellphone: "",
id_card_num: "",
telnum: "",
bank: "",
bank_num: "",
front_image_id: 0,
bank_image_id: 0,
business_license: 0,
create_time: 0,
update_time: 0,
delete_time: 0,
front_image: "",
bank_image: "",
license_image: ""
}
async GetcompanyDetail() {
let res = await this.CompanySerivceImpl.GetcompanyDetail({
id: String(this.VueApp.$route.query.id)
})
if (res) {
this.companyDetail = res
}
}
}

View File

@@ -0,0 +1,138 @@
import { BaseLogic, Methods, KeyParams } from "@logic/Base.logic";
import { MessageBox } from 'element-ui';
import {Inject} from "@ann/Ioc.annotation";
import { RoleServiceImpl } from "@impl/Role.service.impl";
export class DepartmentListLogic extends BaseLogic implements Methods {
@Inject()
public readonly RoleServiceImpl!: RoleServiceImpl;
// 保存部门列表的数据
public DepartmentList: KeyParams[] = [];
// 控制是否显示和隐藏添加部门的弹窗
public isShowUpdate: boolean = false;
// 添加和修改部门 的接口参数
public setDepartmentParams: KeyParams = {
id: 0, // 若新增可不传或传0
pid: '', // 上级部门0=顶级部门
role_title: '', // 部门或岗位名称
remark: '', // 备注
status: -9, // -9=禁用9启用
front_page_ids: [] // 关联前段页面操作ID
};
// 是否显示添加岗位的弹窗
public ShowaddRoleDialog: boolean = false
// 如果是1则是添加部门如果是2则是修改
public roleType: number = 1
public isSwitchStatus: boolean = false;
// 添加岗位参数
public addRoleParams: KeyParams = {
pid: '',
role_title: '',
remark: '',
status: 9,
front_page_ids: []
}
// 控制添加岗位弹窗中switc的显示隐藏
public addStatus: boolean = true;
// true 岗位弹窗的时候,点击确定调用 添加接口
// false 点击确定调用 编辑接口
public ShowaddRoleDialogAction: boolean = true;
// 保存前端简单列表的数据
public frontPageList: KeyParams[] = [];
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.DepartmentListRequest();
await this.GetDepartRole({ mode: 'department' });
await this.GetfrontPageList();
}
/**
* 提交岗位接口
* @constructor
*/
public async SubmitRole(): Promise<void> {
await this.DepartmentServiceImpl.addRole(this.addRoleParams);
await this.DepartmentListRequest();
this.ShowaddRoleDialog = false;
}
/**
* 编辑岗位
* @constructor
*/
public async EditRole(): Promise<void> {
await this.DepartmentServiceImpl.EditRole(this.addRoleParams);
await this.DepartmentListRequest();
this.ShowaddRoleDialog = false;
}
/**
* 获取前端简单列表
* @constructor
*/
public async GetfrontPageList(): Promise<void> {
this.frontPageList = await this.RoleServiceImpl.frontPageSimpleList({
});
}
/**
* 是否启用
*/
public isOpenStatus(v: any) {
v ? this.setDepartmentParams.status = 9 : this.setDepartmentParams.status = -9
}
/**
* 添加部门
* @constructor
*/
public async DepartmentSetRequest(): Promise<void> {
let res = await this.DepartmentServiceImpl.DepartmentSet(this.setDepartmentParams);
await this.DepartmentListRequest();
this.isShowUpdate = false
}
/**
* 修改部门
* @constructor
*/
public async DepartmentRoleEdit(): Promise<void> {
console.log("添加和修改部门: ", this.setDepartmentParams)
let res = await this.DepartmentServiceImpl.DepartmentRoleEdit(this.setDepartmentParams);
await this.DepartmentListRequest();
this.isShowUpdate = false
}
/**
* 删除部门
* @constructor
*/
public async DepartmentDeleteRequest(): Promise<void> {
MessageBox.confirm('确定删除该用户吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
let re = await this.DepartmentServiceImpl.DepartmentDelete({
id: this.clickCurrent.id
});
await this.DepartmentListRequest();
}).catch(() => { });
}
}

View File

@@ -0,0 +1,21 @@
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class FinancialManagementListLogic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
}
}

View File

@@ -0,0 +1,179 @@
import { BaseLogic, VueType, Methods, KeyParams } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { RoleServiceImpl } from "@impl/Role.service.impl";
export class FontEndMenuConfigLogic extends BaseLogic implements Methods {
@Inject()
public readonly RoleServiceImpl!: RoleServiceImpl;
public PageData: KeyParams[] = [];
// 控制添加后端权限的弹窗是否显示
public isShowDialog: boolean = false;
public TestPath: string = '';
public sss: string = '';
public statusTest: Object = JSON.stringify({
status: 1
})
// 设置前端页面的接口参数
public setFrontPage: KeyParams = {
id: '',
pid: '',
icon: '',
label: '',
web_href: '',
sort: '',
status: '',
is_menu: '',
page_type: '0',
component_id: '',
param: {},
auth_rule_ids: [],
actions: [],
};
public actionChioos: Array<any> = [];
public statusText: boolean = true;
public isMenuText: boolean = false;
// 保存后端权限简单列表的数据
public AccessListData: KeyParams[] = [];
// 保存前端页面简单列表的数据
public frontPageData: KeyParams[] = [];
// false 添加true 编辑
public ApiStatus: boolean = false;
// 保存前端组件列表的数据
public ComponentListData: KeyParams[] = [];
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.PageGetList();
await this.frontPageSimpleList();
await this.ParentAccessList();
await this.ComponentListRequest()
}
public chiooseAction(v:any) {
if (this.actionChioos.includes(v.value) ) {
this.actionChioos = this.actionChioos.filter((t:string)=>{
return t != v.value
})
} else {
this.actionChioos.push(v.value)
}
}
/**
* 提交前端页面
* @constructor
*/
public async SubmitAddMenu(): Promise<void> {
console.log(this.setFrontPage)
if (this.setFrontPage.id == 0) {
this.setFrontPage.id = 0;
}
// true 编辑
if (this.ApiStatus) {
let res = await this.RoleServiceImpl.FrontEditPage(this.setFrontPage);
// false 添加
} else {
this.setFrontPage.actions = this.actionChioos;
let res = await this.RoleServiceImpl.FrontSetPage(this.setFrontPage);
}
await this.PageGetList();
await this.frontPageSimpleList();
}
public NodeCheck(e: any,t: boolean, a:boolean) {
if (e.hasOwnProperty("children")) {
console.log("一级或者二级节点,跳过保存")
} else {
console.log("三级节点")
// true 节点被选中
if (t) {
this.setFrontPage.auth_rule_ids.push(e.id)
console.log("节点被选中:", this.setFrontPage.auth_rule_ids)
// false 节点被取消选中
} else {
console.log("e.id :", e.id)
this.setFrontPage.auth_rule_ids = this.setFrontPage.auth_rule_ids.filter((v:number)=>{
return v != e.id
});
console.log("取消选中,去除数据:", this.setFrontPage.auth_rule_ids)
}
}
}
/**
* 前端页面列表
* @constructor
*/
public async PageGetList(): Promise<void> {
this.PageData = await this.RoleServiceImpl.PageGetList({});
console.log("前端页面列表: ", this.PageData)
}
/**
* 获取后端权限简单列表
* @constructor
*/
public async ParentAccessList(): Promise<void> {
let res = await this.RoleServiceImpl.GetParentAccessList({
// mode: 'signal'
});
res.forEach((v:any)=>{
v.label = v.auth_title;
if (v.hasOwnProperty("children")) {
v.children.forEach((t:any)=>{
t.label = t.auth_title;
if (t.hasOwnProperty("children")) {
t.children.forEach((k:any)=>{
k.label = k.auth_title;
})
}
})
}
})
this.AccessListData = res;
console.log("后端权限简单列表: ", res)
}
/**
* 获取前端页面的简单列表
*/
public async frontPageSimpleList(): Promise<void> {
let res = await this.RoleServiceImpl.frontPageSimpleList({})
res.push({
id: 0,
pid: 0,
value: 0,
label: '顶级权限',
auth_title: '顶级权限'
})
this.frontPageData = res
console.log("获取前端页面的简单列表: ", res)
}
/**
* 获取前端组件列表
*/
public async ComponentListRequest(): Promise<void> {
this.ComponentListData = await this.RoleServiceImpl.componentList({})
console.log("获取前端组件列表: ", this.ComponentListData)
}
}

View File

@@ -0,0 +1,82 @@
import { BaseLogic, VueType, Methods, KeyParams } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
import { AuditManagementServiceImpl } from '@/core/service/impl/AuditManagement.service.impl';
import { PublicServiceImpl } from '@/core/service/impl/Public.service.impl';
export class GuaranteeManagementListLogic extends BaseLogic implements Methods {
@Inject()
public readonly AuditManagementServiceImpl!: AuditManagementServiceImpl;
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
// 存放待审核列表的数据
public ToBeReviewedData: KeyParams[] = [];
// 预览地址
public PdfPreviewUrl: string = "";
public IsShowInvoicePreview: boolean = false;
// 待审核列表的接口需要的检索参数
public TbSearchKey: KeyParams = {
text_field: '', // 查询字段apply_num申请编号
text_value: '', // input输入查询字段的精确值
date_field: '', // 时间字段create_time创建时间provide_time出函时间
date_range: '', // 时间值
limit: 10,
page: 1,
};
public DateSelectText!: any;
public title: string = '';
constructor(point: any) {
super();
this.VueApp = point;
}
// 判断路由地址,访问对应接口
public async StartUp(): Promise<void> {
this.title = this.VueApp.$route.meta.title;
this.TbSearchKey.stat = this.VueApp.$route.meta.type
let t = await this.PublicServiceImpl.GuaranteeList(this.TbSearchKey);
this.TotalCount = t.count;
this.ToBeReviewedData = [...t.list];
}
/**
* 各个按钮点击后的事件判断
* @param type
* @param v
* @constructor
*/
public async ProcessingClicks(type: string, v: any) {
console.log(type)
console.log(v)
switch (type) {
// 出函
case 'guarantee_provide':
await this.PublicServiceImpl.GuaranteeProvide({
apply_id: v.apply_id
});
await this.StartUp()
break;
default:
break;
}
}
/**
* 处理时间选择器获得的时间格式
* 转换为 xxx-xx-xx - xxx-xx-xx
* @param v
*/
public datePickerChange(v: Date[]) {
this.TbSearchKey.date_range = `${this.VueApp.$DateToString(v[0])} - ${this.VueApp.$DateToString(v[1])}`
}
}

View File

@@ -0,0 +1,55 @@
import { Injectable, Inject } from "@ann/Ioc.annotation";
import { PublicServiceImpl } from "@impl/Public.service.impl";
import { BaseLogic, KeyParams, Methods } from "@logic/Base.logic";
export class HomeLogic extends BaseLogic implements Methods {
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
public HomeData: KeyParams[] = [];
public ToDoList: KeyParams[] = [];
constructor(point: any) {
super();
this.VueApp = point
}
public async StartUp(): Promise<void> {
await this.GetHomeIndex();
await this.GetUserInfo();
this.ToDoList = localStorage.getItem("ToDoList") == null
? []
: JSON.parse(<string>localStorage.getItem("ToDoList"));
}
/**
* 事宜的输入框值
*/
public ToDoInputValue: string = ''
/**
* 待审核列表
*/
public newData = [{
id: '12565',
name1: '某某公司询问保函',
name2: '某某部门已经在处理这个事了,如果参与的哇哈哈哈'
}, {
id: '12565',
name1: '某某公司询问保函',
name2: '某某部门已经在处理这个事了,如果参与的哇哈哈哈'
}, {
id: '12565',
name1: '某某公司询问保函',
name2: '某某部门已经在处理这个事了,如果参与的哇哈哈哈'
}, {
id: '12565',
name1: '某某公司询问保函',
name2: '某某部门已经在处理这个事了,如果参与的哇哈哈哈'
}]
public async GetHomeIndex(): Promise<void> {
this.HomeData = await this.PublicServiceImpl.HomeIndex({})
console.log("首页数据统计:", this.HomeData)
}
}

View File

@@ -0,0 +1,108 @@
import {BaseLogic, VueType, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { PublicServiceImpl } from "@impl/Public.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class InformationFlowLogic extends BaseLogic implements Methods {
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
public WorkFlowData: KeyParams[] = [];
public SelectNewList: KeyParams[] = [];
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.GetWorkFlowDetail()
await this.EditDepartRole()
}
/**
* 对部门岗位数据进行构造,追加全部岗位
* @constructor
*/
public async EditDepartRole(): Promise<void> {
await this.GetDepartRole({client: 'admin'});
this.DepartRoleList.forEach((v,i)=>{
v.children.push({
id: v.id,
is_endpoint: 1,
pid: v.id,
role_title: `${v.role_title} - 全部岗位`,
role_type: 1,
})
});
this.DepartRoleList.forEach((v,i)=>{
this.SelectNewList.push({
value: v.id,
label: v.role_title,
options: []
})
v.children.forEach((t:any,j:number)=>{
this.SelectNewList[i].options.push({
value: t.id,
label: t.role_title
})
})
})
console.log("【简单列表】部门岗位:", this.SelectNewList)
}
/**
* 上移动 下标-1
* @constructor
*/
public MoveUp(index:number): void | boolean {
if (index > 0) {
let upDate = this.WorkFlowData[index - 1];
this.WorkFlowData.splice(index - 1, 1);
this.WorkFlowData.splice(index, 0, upDate);
} else {
return false;
}
}
/**
* 下移动 +1
* @constructor
*/
public MoveDown(index:number): void | boolean {
if (index + 1 === this.WorkFlowData.length) {
return false;
} else {
let downDate = this.WorkFlowData[index + 1];
this.WorkFlowData.splice(index + 1, 1);
this.WorkFlowData.splice(index, 0, downDate);
}
}
/**
* 获取信息流程
* @constructor
*/
public async GetWorkFlowDetail(): Promise<void> {
let res = await this.PublicServiceImpl.WorkFlowDetail({});
this.WorkFlowData = res;
console.log("获取信息流程: ", res)
}
/**
* 提交信息数据
* @constructor
*/
public async SubmitWorkFlow(): Promise<void> {
let res = await this.PublicServiceImpl.workFlowUpdate({
flows: this.WorkFlowData
})
console.log("提交信息数据: ", this.WorkFlowData)
}
}

View File

@@ -0,0 +1,37 @@
import {BaseLogic, VueType, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { PublicServiceImpl } from "@impl/Public.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class InvoiceListLogic extends BaseLogic implements Methods {
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
public ReceiptList: KeyParams[] = [];
public IsShowInvoicePreview: boolean = false;
public PdfPreviewUrl: string = "";
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.GetReceiptList()
}
/**
* 获取发票列表
* @constructor
*/
public async GetReceiptList(): Promise<void> {
let res = await this.PublicServiceImpl.ReceiptList({})
this.TotalCount = res.count;
this.ReceiptList = res.list;
}
}

View File

@@ -0,0 +1,88 @@
import { Injectable, Inject } from "@ann/Ioc.annotation";
import { BaseLogic, Methods } from "@logic/Base.logic";
import { CompanySerivceImpl } from '@/core/service/impl/Company.serivce.impl';
import { IndexUtils } from '@/core/utils/index.utils';
export interface EnterprisesList {
id: number
name: string
credit_code: string
business_term: number
reg_address: string
legal_name: string
legal_cellphone: string
id_card_num: string
create_time: string
}
export interface CompanyParam {
text_field: string
text_value: string
date_field: string
date_range: any[] | string
page: number
limit: number
}
@Injectable()
export class ListOfEnterprisesLogic extends BaseLogic implements Methods {
@Inject()
private IndexUtils!: IndexUtils;
@Inject()
private CompanySerivceImpl!: CompanySerivceImpl
constructor(point: any) {
super();
this.VueApp = point
}
public async StartUp(): Promise<void> {
await this.getCompany()
}
public enterprisesList: DataFormat<EnterprisesList[]> = {
count: 0,
list: []
}
/**
* 查询字段数据
*/
public textFiledList = [
{
value: 'company_name',
label: '企业名称'
}, {
value: 'legal_name',
label: '法人姓名'
}, {
value: 'legal_cellphone',
label: '法人电话'
}
]
// 查询数据
public companyParam: CompanyParam = {
text_field: '',
text_value: '',
date_field: 'create_time',
date_range: '',
page: 1,
limit: 10
}
async getCompany() {
let companyParam: CompanyParam = JSON.parse(JSON.stringify(this.companyParam))
if (typeof companyParam.date_range !== 'string' && companyParam.date_range !== null && companyParam.date_range.length > 0) {
companyParam.date_range = `${this.IndexUtils.DateToString(this.companyParam.date_range[0])} - ${this.IndexUtils.DateToString(this.companyParam.date_range[1])}`
}
let res = await this.CompanySerivceImpl.GetCompanyIndex(companyParam)
if (res) {
this.enterprisesList = res
}
}
}

View File

@@ -0,0 +1,53 @@
import {Injectable, Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import {BaseLogic, KeyParams, Methods, VueType} from "@logic/Base.logic";
import { Getter, Mutation } from "vuex-class";
import { RouterUtils } from "@utils/router.utils";
@Injectable()
export class LoginLogic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
@Inject()
private RouterUtils!: RouterUtils;
// 登录接口的参数
public UserLogin: { username: string, password: string } = {
username: '', password: ''
};
constructor(point: any) {
super();
this.VueApp = point
}
public async StartUp(): Promise<void> { }
/**
* 登录按钮点击
* @constructor
*/
public async SubmitLogin(): Promise<void> {
// 登录成功后
let res = await this.UserServiceImpl.UserLogin(this.UserLogin);
this.VueApp.$setToken(res.token);
// 获取用户数据
let UserInfo = await this.UserServiceImpl.GetUserInfo({});
// 生成路由和左侧导航菜单
this.RouterUtils.CreateRouterConfig(this.VueApp.$router, UserInfo.route)
// 本地缓存数据
localStorage.setItem("Router", JSON.stringify(UserInfo.route));
if (this.VueApp.$route.query.hasOwnProperty("redirect")) {
await this.VueApp.$router.replace(<string>this.VueApp.$route.query.redirect)
} else {
await this.VueApp.$router.replace('/Home')
}
}
}

View File

@@ -0,0 +1,43 @@
import {BaseLogic, VueType, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { PublicServiceImpl } from "@impl/Public.service.impl";
export class LoginLogLogic extends BaseLogic implements Methods {
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
public loginLogParams: KeyParams = {
text_field: '',
text_value: '',
date_filed: 'create_time',
date_range: '',
client: '',
status: '',
sort: 'create_time_desc',
page: 1,
limit: 10,
}
// 保存登录日志的表格数据
public LogData: KeyParams[] = [];
public DateSelectText: string = "";
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.getLoginLog()
}
public async getLoginLog(): Promise<void> {
let res = await this.PublicServiceImpl.LoginLog(this.loginLogParams);
this.TotalCount = res.count;
this.LogData = res.list
console.log("用户登录日志:", res)
}
}

View File

@@ -0,0 +1,43 @@
import {BaseLogic, VueType, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { PublicServiceImpl } from "@impl/Public.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class OperationLogLogic extends BaseLogic implements Methods {
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
public OLogParams: KeyParams = {
text_field: '',
text_value: '',
date_field: 'create_time',
date_range: '',
sort: 'create_time_desc',
page: 1,
limit: 10,
};
// 保存操作日志的表格数据
public LogData: KeyParams[] = [];
public DateSelectText: string = "";
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.GetOperationLog()
}
public async GetOperationLog(): Promise<void> {
let res = await this.PublicServiceImpl.OperationLog(this.OLogParams);
this.TotalCount = res.count;
this.LogData = res.list
console.log("用户操作日志:", res)
}
}

View File

@@ -0,0 +1,72 @@
import {BaseLogic, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { PublicServiceImpl } from "@impl/Public.service.impl";
export class OrderManagementListLogic extends BaseLogic implements Methods {
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
public OrderList: KeyParams[] = [];
public orderParams: KeyParams = {
text_field: '',
text_value: '',
date_field: '',
date_range: "",
page: 1,
limit: 10,
stat: ''
};
public title: string = ""
public DateSelectText: string = "";
public account: KeyParams = {
id: '',
is_pass: '1',
remark: '通过'
};
public IsShow: boolean = false;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
this.title = this.VueApp.$route.meta.title;
this.orderParams.stat = this.VueApp.$route.meta.type;
await this.GetOrderList()
}
public async ProcessingClicks(type: string, val: KeyParams) {
switch (type) {
case 'guarantee_account':
this.IsShow = true;
this.account.id = val.id
break;
default:
break;
}
}
/**
* 对账
* @constructor
*/
public async SubmitAccount(): Promise<void> {
await this.PublicServiceImpl.GuaranteeAccount(this.account);
this.orderParams.stat = this.VueApp.$route.meta.type;
await this.GetOrderList();
this.IsShow = false;
}
public async GetOrderList(): Promise<void> {
let res = await this.PublicServiceImpl.OrderList(this.orderParams);
this.TotalCount = res.count;
this.OrderList = res.list;
}
}

View File

@@ -0,0 +1,19 @@
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { AuditManagementServiceImpl } from "@impl/AuditManagement.service.impl";
export class PassedLogic extends BaseLogic implements Methods {
@Inject()
public readonly AuditManagementServiceImpl!: AuditManagementServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
}
}

View File

@@ -0,0 +1,62 @@
import { BaseLogic, VueType, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { DepartmentServiceImpl } from "@impl/Department.service.impl";
export class ReviewedTemplateLogic extends BaseLogic implements Methods {
@Inject()
public readonly DepartmentServiceImpl!: DepartmentServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.DepartmentListRequest();
}
/**
* 上移动 下标-1
* @constructor
*/
public MoveUp(index:number, id: number): void | boolean {
if (index > 0) {
let upDate = this.DepartmentList[index - 1];
this.DepartmentList.splice(index - 1, 1);
this.DepartmentList.splice(index, 0, upDate);
} else {
return false;
}
}
/**
* 下移动 +1
* @constructor
*/
public MoveDown(index:number, id: number): void | boolean {
if (index + 1 === this.DepartmentList.length) {
return false;
} else {
let downDate = this.DepartmentList[index + 1];
this.DepartmentList.splice(index + 1, 1);
this.DepartmentList.splice(index, 0, downDate);
}
}
/**
* 提交流程模板
* @constructor
*/
public async ProcessIndexRequest(): Promise<void> {
let result: number[] = [];
this.DepartmentList.forEach((v,i)=>{
result.push(v.id)
})
let res = await this.DepartmentServiceImpl.ProcessIndex({
process: result
})
}
}

View File

@@ -0,0 +1,21 @@
import { BaseLogic, VueType, Methods } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class RiskManagementListLogic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
}
}

View File

@@ -0,0 +1,296 @@
import {BaseLogic, KeyParams, VueType, Methods} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { RoleServiceImpl } from "@impl/Role.service.impl";
import { DepartmentServiceImpl } from "@impl/Department.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class RoleListLogic extends BaseLogic implements Methods{
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
@Inject()
public readonly RoleServiceImpl!: RoleServiceImpl;
@Inject()
public readonly DepartmentServiceImpl!: DepartmentServiceImpl;
// 保存角色列表
public RoleList: KeyParams[] = [];
// 控制添加角色的弹窗
public isShowRoleAdd: boolean = false;
// 保存部门列表的数据
public DepartmentList: KeyParams[] = [];
// 分配权限弹窗的标题
public ConfigRoleTitle: string = ""
// 添加和修改角色的接口数据
public addRoleParam: KeyParams = {
id: '',
department_id: null,
title: '',
status: false,
is_verify: false,
sort: 0
};
// 保存角色权限,同时也是 分配权限的接口参数nodes
public RoleAuthList: KeyParams[] = [];
// 保存根节点角色权限
public RoleNodeList: KeyParams[] = [];
// 决定分配权限弹窗是否显示
public isNodeList: boolean = false;
public activeIndex: number = 0;
constructor(point: any) {
super();
this.VueApp = point
}
public async StartUp(): Promise<void> {
await this.RoleIndexRequest();
await this.DepartmentListRequest();
await this.RoleGetNodeListRequest()
}
/**
* 最外层点击选中事件
* @constructor
*/
public FirstCheckChioose(v: any, i:number, er?: any, yi?:any): void {
// 表示已经有了
if (this.CheckIsHaveData(v)) {
// 去除数据
v.basics = false
this.RoleAuthList = this.RoleAuthList.filter(t=> t != v.id);
this.CheckIsHaveChildren(v,false)
// 没有数据
} else {
v.basics = true
// 保存数据
this.RoleAuthList.push(v.id);
this.CheckIsHaveChildren(v,true)
}
// const checkSelect = (v:any) =>{
// // 表示已经有了
// if (this.CheckIsHaveData(v)) {
// // 去除数据
// v.basics = false
// this.RoleAuthList = this.RoleAuthList.filter(t=> t != v.id);
// this.CheckIsHaveChildren(v,false)
//
// // 没有数据
// } else {
// v.basics = true
// // 保存数据
// this.RoleAuthList.push(v.id);
// this.CheckIsHaveChildren(v,true)
// }
// }
// // 点的是二级
// if (er != undefined && yi == undefined) {
// if (this.CheckIsHaveData(er[0])) {
// er[0].basics = false
// er[0].children[er[1]].basics = false;
// this.RoleAuthList = this.RoleAuthList.filter(t=> t != er[0].id);
// this.CheckIsHaveChildren(er[0].children[er[1]],false)
// } else {
// console.log("没有点击过")
// er[0].basics = true;
// er[0].children[er[1]].basics = true;
// this.RoleAuthList.push(er[0].id);
// this.CheckIsHaveChildren(er[0].children[er[1]],true)
// }
// console.log("点的是二级")
// }
//
// // 点的是三级
// if (er !== undefined && yi !== undefined) {
// if (this.CheckIsHaveData(er[0])) {}
// checkSelect(er)
// checkSelect(yi)
// }
}
/**
* 检查数据是否有 children如果有一起全选或者反选
* @param v 被点击的数据
* @param status 状态
* @constructor
*/
public CheckIsHaveChildren(v:any, status: boolean) {
if (v.hasOwnProperty("children")) {
v.children.forEach((w:any,o:number)=>{
w.basics = status
if (!w.basics) {
this.RoleAuthList = this.RoleAuthList.filter(t=> t != w.id);
} else {
this.RoleAuthList.push(w.id);
}
this.CheckIsHaveChildren(w,status)
})
}
}
/**
* 检查数据是否已经被选中保存过了
* @param v
* @constructor
*/
public CheckIsHaveData(v:any): boolean {
let res = this.RoleAuthList.filter(t => t == v.id);
if (res.length != 0) {
return true
} else {
return false
}
}
/**
* 添加角色的 接口
* @constructor
*/
public async RoleSetRequest(): Promise<void> {
let MoreStatus = {
status: 0,
is_verify: 0
}
this.addRoleParam.status ? MoreStatus.status = 1 : MoreStatus.status = 0;
this.addRoleParam.is_verify ? MoreStatus.is_verify = 1 : MoreStatus.is_verify = 0;
let res = await this.RoleServiceImpl.RoleSet({
...this.addRoleParam,
...MoreStatus
});
await this.RoleIndexRequest()
this.isShowRoleAdd = false;
}
/**
* 获取角色类型 接口
* @constructor
*/
public async RoleIndexRequest(): Promise<void> {
this.RoleList = await this.UserServiceImpl.RoleIndex({});
}
/**
* 获取部门列表的数据
* @constructor
*/
public async DepartmentListRequest(): Promise<void> {
this.DepartmentList = await this.DepartmentServiceImpl.DepartmentList({});
}
/**
* 获取角色的权限
* @constructor
*/
public async RoleAuthListRequest(): Promise<void> {
this.RoleAuthList= [];
this.RoleAuthList = await this.RoleServiceImpl.RoleAuthList({
role_id: this.clickCurrent.id
});
console.log("获取角色的默认权限 ===> ", this.RoleAuthList)
await this.RoleGetNodeListRequest()
// 将 is_default 为1的也加到数组中保存
this.RoleNodeList.forEach((t,k)=>{
t.is_default == 1 ? this.RoleAuthList.push(t.id) : '';
if (t.hasOwnProperty("children")) {
t.children.forEach((s:any,x:number)=>{
s.is_default == 1 ? this.RoleAuthList.push(s.id) : '';
if (s.hasOwnProperty("children")) {
s.children.forEach((r:any,b:number)=>{
r.is_default == 1 ? this.RoleAuthList.push(r.id) : '';
})
}
})
}
})
// 判断用户的权限在根权限中是否已经选中,如果是修改 basics true
this.RoleAuthList.forEach((v,i)=>{
this.RoleNodeList.forEach((t,k)=>{
if (t.id == v) {
t.basics = true;
} else {
if (t.hasOwnProperty("children")) {
t.children.forEach((s:any,x:number)=>{
if (s.id == v) {
s.basics = true;
} else {
if (s.hasOwnProperty("children")) {
s.children.forEach((r:any,b:number)=>{
if (r.id == v) {
r.basics = true;
}
})
}
}
})
}
}
})
});
}
/**
* 分配权限 节点被选择的时候
* @param data
* @param checked
* @constructor
*/
public TreeSelect(data:any, TreeSelect: any): void {
this.RoleAuthList = TreeSelect.checkedKeys
}
/**
* 提交用户选中的权限
* @constructor
*/
public async RoleSetRoleAuth(): Promise<void> {
let res = await this.RoleServiceImpl.RoleSetRoleAuth({
role_id: this.clickCurrent.id,
nodes: this.RoleAuthList
});
}
/**
* 获取根节点权限
* @constructor
*/
public async RoleGetNodeListRequest(): Promise<void> {
this.RoleNodeList = await this.RoleServiceImpl.RoleGetNodeList({});
console.log("获取跟节点权限 ==========", this.RoleNodeList)
}
/**
* 删除角色
* @constructor
*/
public async RoleDeleteRequest(): Promise<void> {
MessageBox.confirm('确定删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
let res = await this.RoleServiceImpl.RoleDelete({
id: this.clickCurrent.id
});
await this.DepartmentListRequest()
}).catch(() => {});
}
}

View File

@@ -0,0 +1,51 @@
import {BaseLogic, VueType, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { PublicServiceImpl } from "@impl/Public.service.impl";
export class SystemConfigurationLogic extends BaseLogic implements Methods {
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
// 保存系统配置
public SettingConfig: KeyParams[] = [];
// 提交配置给后端
public setConfig: KeyParams[] = [];
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.AppGetSettingConfig()
}
public SaveConfig(v: KeyParams) {
this.setConfig.push({
id: v.id,
setting_value: v.setting_value
});
console.log("编辑后的数据:", this.setConfig)
}
/**
* 修改系统配置
* @constructor
*/
public async SetSettingConfig(): Promise<void> {
await this.PublicServiceImpl.AppSetSettingConfig({
config: this.setConfig
});
}
/**
* 获取系统配置
* @constructor
*/
public async AppGetSettingConfig(): Promise<void> {
this.SettingConfig = await this.PublicServiceImpl.AppGetSettingConfig({});
console.log("获取系统配置: ", this.SettingConfig)
}
}

View File

@@ -0,0 +1,113 @@
import { BaseLogic, VueType, Methods, KeyParams } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { PublicServiceImpl } from "@impl/Public.service.impl";
import { AuditManagementServiceImpl } from "@impl/AuditManagement.service.impl";
import { MessageBox } from 'element-ui';
export class ToBeReviewedInfoLogic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
@Inject()
public readonly AuditManagementServiceImpl!: AuditManagementServiceImpl;
public IsShowAgent: boolean = false;
// 存放审核详情的数据
public GuaranteeDetail: KeyParams = {};
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.GuaranteeDetailRequest()
}
/**
* 导出记录下载文件
* @constructor
*/
public async DownHistory(): Promise<void> {
// location.href = (this.GuaranteeDetail as any).head.export_url
let xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", (this.GuaranteeDetail as any).head.export_url, true);
xmlhttp.send();
xmlhttp.onreadystatechange = () => {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
try {
JSON.parse(xmlhttp.responseText)
MessageBox.alert('对不起,您没有该功能权限!', '提示信息', {
confirmButtonText: '确定',
callback: action => { }
});
} catch (error) {
location.href = (this.GuaranteeDetail as any).head.export_url
}
}
}
// let res = await this.PublicServiceImpl.ExprotHistoryRecord({})
// console.log(res);
// console.log("this.GuaranteeDetail: ", )
// let res = await this.PublicServiceImpl.ExprotHistoryRecord({
// id: this.VueApp.$route.query.id
// });
// console.log("下载文件:", res)
}
public async GuaranteeDetailRequest(): Promise<void> {
this.GuaranteeDetail = await this.AuditManagementServiceImpl.GuaranteeDetail({
id: this.VueApp.$route.query.id
});
// 企业资质 图片
console.log("this.GuaranteeDetail: ", this.GuaranteeDetail)
this.GuaranteeDetail.qualiImgList = [
this.GuaranteeDetail.company.front_image,
this.GuaranteeDetail.company.bank_image,
this.GuaranteeDetail.company.license_image,
];
// 经办人图片
this.GuaranteeDetail.AgentImgList = [
this.GuaranteeDetail.company.operator.operator_front_image,
this.GuaranteeDetail.company.operator.operator_bank_image,
];
// 经办人资质operator_letter_image ===null && is_same ===1 显示文字,经办人与法人一致无需授权书
if (this.GuaranteeDetail.company.operator.operator_letter_image == null &&
this.GuaranteeDetail.company.operator.is_same == 1) {
this.IsShowAgent = true
} else {
this.GuaranteeDetail.AgentImgList.push(
this.GuaranteeDetail.company.operator.operator_letter_image
)
this.IsShowAgent = false
}
}
public async guaranteeOperateBid(type: number) {
MessageBox.confirm('点击中标,该项目当前页面的企业会被标注中标按钮,该项目其他企业保函全部失效,点击未中标按钮,当前项目所有的企业保函失效', '提示信息', {
confirmButtonText: '已阅读,并提交',
cancelButtonClass: '取消',
callback: async (action) => {
if (action === 'confirm') {
let res = await this.AuditManagementServiceImpl.guaranteeOperateBid({
id: this.VueApp.$route.query.id,
status: type
})
if(res !== void 0) {
this.GuaranteeDetailRequest()
}
}
}
});
}
}

View File

@@ -0,0 +1,215 @@
import { BaseLogic, Methods, KeyParams } from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { AuditManagementServiceImpl } from "@impl/AuditManagement.service.impl";
import { PublicServiceImpl } from "@impl/Public.service.impl";
import {RawLocation, Route} from "vue-router";
import { Vue, Watch } from "vue-property-decorator";
import { Loading } from 'element-ui';
export class ToBeReviewedListLogic extends BaseLogic implements Methods {
@Inject()
public readonly AuditManagementServiceImpl!: AuditManagementServiceImpl;
@Inject()
public readonly PublicServiceImpl!: PublicServiceImpl;
// 存放待审核列表的数据
public ToBeReviewedData: KeyParams[] = [];
// 待审核列表的接口需要的检索参数
public TbSearchKey: KeyParams = {
text_field: '', // 查询字段(投标企业名称company招标项目名称project招标企业名称tender)
text_value: '', // input输入查询字段的精确值
date_field: '', // 时间字段(pay_time支付时间create_time申请时间expire_time失效时间)
date_range: '', // 时间值
status_field: '',// 二级联动审核状态verify_status中标状态bid_status支付状态pay_status,出函状态give_status
status_value: '',// 联动status_field(审核状态【0未通过1已通过】中标状态【0未中标1已中标】支付状态【0未支付1已支付】出函状态【0未出函1已出函】)
limit: 10,
page: 1,
stat: '',
};
// status_value 根据 status_field 选择来联动
public statusValueSelect: KeyParams = {
verify_status: [
{ value: 0, text: '未通过' },
{ value: 1, text: '已通过' },
],
bid_status: [
{ value: 0, text: '未中标' },
{ value: 1, text: '已中标' },
],
pay_status: [
{ value: 0, text: '未支付' },
{ value: 1, text: '已支付' },
],
give_status: [
{ value: 0, text: '未出函' },
{ value: 1, text: '已出函' },
]
}
// 保存 status_value 的数组
public statusValueList: KeyParams[] = [];
public DateSelectText!: any;
public title: string = '';
// 控制弹窗是否显示
public isShow: boolean = false;
// 审批通过的参数
public manageApprove: KeyParams = {
apply_id: '',
is_pass: '1',
remark: ''
}
public test: any = true;
/**
* 1: 审批
* 2审核
* 3受理
*/
public DiaLogStatus!: string;
// 保存点击后的数据,以便于在弹窗中展示
public TipsMessage!: KeyParams;
constructor(point: any) {
super();
this.VueApp = point;
}
// 判断路由地址,访问对应接口
public async StartUp(): Promise<void> {
this.title = this.VueApp.$route.meta.title;
this.TbSearchKey.stat = this.VueApp.$route.meta.type;
let b = await this.PublicServiceImpl.BusinessManagementList(this.TbSearchKey);
this.TotalCount = b.count;
this.ToBeReviewedData = [...b.list];
}
/**
* 是否通过radio选中时候
* 如果为通过那么备注默认为通过
* 否则备注为空
* @param v
* @constructor
*/
public RadioChange(v: string) {
v == '1' ? this.manageApprove.remark = '通过' : this.manageApprove.remark = ''
}
/**
* 提交审批
*/
public async submitPass() {
let loadingInstance1 = Loading.service({
text: '请耐心等待...'
})
switch (this.DiaLogStatus) {
case '1':
await this.PublicServiceImpl.GuaranteeManageApprove(this.manageApprove)
loadingInstance1.close();
this.clearParams()
break;
case '2':
await this.PublicServiceImpl.GuaranteeManageVerify(this.manageApprove)
loadingInstance1.close();
this.clearParams()
break;
case '3':
await this.PublicServiceImpl.GuaranteeManageAccept(this.manageApprove)
loadingInstance1.close();
this.clearParams()
break;
}
}
/**
* 关闭弹窗,重置接口请求参数
*/
public clearParams(): void {
this.isShow = false
this.manageApprove.apply_id = ''
this.manageApprove.is_pass = '1'
this.manageApprove.remark = ''
this.StartUp()
}
/**
* 各个按钮点击后的事件判断
* @param type
* @param v
* @constructor
*/
public ProcessingClicks(type: string, v: any) {
this.TipsMessage = v
switch (type) {
// 详情按钮
case 'guarantee_detail':
this.VueApp.$router.push({
name: 'AuditManagement-ToBeReviewedInfo',
query: {
id: v.id,
action: this.VueApp.$route.query.action
}
})
break;
// 审批按钮
case 'guarantee_approve':
this.DiaLogStatus = '1'
this.manageApprove.is_pass == '1'
? this.manageApprove.remark = '通过'
: this.manageApprove.remark = ''
this.manageApprove.apply_id = v.id
this.isShow = true
break;
// 审核的按钮
case 'guarantee_verify':
this.DiaLogStatus = '2'
this.manageApprove.is_pass == '1'
? this.manageApprove.remark = '通过'
: this.manageApprove.remark = ''
this.manageApprove.apply_id = v.id
this.isShow = true
break;
case 'guarantee_accept':
this.DiaLogStatus = '3'
this.manageApprove.is_pass == '1'
? this.manageApprove.remark = '通过'
: this.manageApprove.remark = ''
this.manageApprove.apply_id = v.id
this.isShow = true
default:
break;
}
}
/**
* 筛选条件 状态被选中的时候
* 取出联动的数据
* @param v
*/
public statusFieldChange(v: string): void {
this.statusValueList = this.statusValueSelect[v]
}
/**
* 处理时间选择器获得的时间格式
* 转换为 xxx-xx-xx - xxx-xx-xx
* @param v
*/
public datePickerChange(v: Date[]) {
this.TbSearchKey.date_range = `${this.VueApp.$DateToString(v[0])} - ${this.VueApp.$DateToString(v[1])}`
}
}

View File

@@ -0,0 +1,43 @@
import {BaseLogic, VueType, Methods, KeyParams} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { Vue } from "vue-property-decorator";
import { MessageBox } from 'element-ui';
export class UserInfoLogic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
constructor(point: any) {
super();
this.VueApp = point;
}
public async StartUp(): Promise<void> {
await this.getUserInfo()
}
public userInfo: KeyParams = {
user: {
full_name: '',
cellphone: ''
}
}
/**
* 保存用户信息
*/
public async setUserInfo(): Promise<void> {
await this.UserServiceImpl.SetProfile({
full_name: this.userInfo.user.full_name,
cellphone: this.userInfo.user.cellphone,
})
}
async getUserInfo() {
this.userInfo = await this.UserServiceImpl.GetUserInfo({});
}
}

View File

@@ -0,0 +1,195 @@
import {BaseLogic, KeyParams, Methods, VueType} from "@logic/Base.logic";
import { Inject } from "@ann/Ioc.annotation";
import { UserServiceImpl } from "@impl/User.service.impl";
import { MessageBox } from 'element-ui';
export class wardenListLogic extends BaseLogic implements Methods {
@Inject()
public readonly UserServiceImpl!: UserServiceImpl;
// 保存列表数据
public TableData: KeyParams[] = [];
// 决定添加新管理员的显示和隐藏
public isShowaddNewUser: boolean = false;
// 决定编辑管理员弹窗的显示和隐藏
public isShowEditUser: boolean = false;
// 添加管理员的接口参数
public setUserParams: KeyParams = {
username: '',
password: '',
cellphone: '',
full_name: '',
department_id: '', // 部门id
role_id: '', // 用户角色 id
status: 9, // 是否启用
};
public SwitchStatus: boolean = true;
public bmText: string = "请选择";
public jsText: string = "请选择";
public EditbmText: string = "请选择";
public EditjsText: string = "请选择";
// true 添加接口false编辑接口
public ApiStatus: boolean = true;
//保存角色列表
public RoleList: KeyParams[] = [];
constructor(point: any) {
super();
this.VueApp = point
}
public async StartUp(): Promise<void> {
await this.GetTableData();
// await this.GetRoleIndex();
await this.GetDepartRole();
}
/**
* 用户选择部门的下拉事件
* @param v
* @constructor
*/
public DepartChange(v: number) {
this.bmText = this.DepartRoleList[v].role_title;
this.setUserParams.department_id = this.DepartRoleList[v].id;
this.RoleList = this.DepartRoleList[v].children;
// 重置角色
this.jsText = '请选择';
this.setUserParams.role_id = '';
}
/**
* 用户角色的下拉事件
* @param v
* @constructor
*/
public RoleChange(v: number) {
this.jsText = this.RoleList[v].role_title;
this.setUserParams.role_id = this.RoleList[v].id;
}
/**
* 编辑部门的下拉事件
* @param v
* @constructor
*/
public BmDepartChange(v: number) {
this.setUserParams.department_id = this.DepartRoleList[v].id;
this.EditbmText = this.DepartRoleList[v].role_title;
this.RoleList = this.DepartRoleList[v].children;
// 重置角色
this.EditjsText = '请选择';
this.setUserParams.role_id = '';
}
/**
* 编辑角色的下拉事件
* @param v
* @constructor
*/
public EditRoleChange(v: number) {
this.EditjsText = this.RoleList[v].role_title;
this.setUserParams.role_id = this.RoleList[v].id;
}
/**
* 禁用用户
* @constructor
*/
public async UserBan(key: KeyParams): Promise<void> {
this.VueApp.$confirm('确认禁用此账号吗?', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
await this.UserServiceImpl.UserBan({
id: this.clickCurrent.id
})
await this.GetTableData()
});
}
/**
* 启用账户
* @param key
*/
public async UserEnable(key: KeyParams): Promise<void> {
this.VueApp.$confirm('确认启用此账号吗?', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
await this.UserServiceImpl.UserEnable({
id: this.clickCurrent.id
})
await this.GetTableData()
});
}
/**
* 编辑用户
* @constructor
*/
public async EditUserRequest(): Promise<void> {
let a = this.setUserParams;
a = Object.assign(a, { member_id: this.clickCurrent.id });
console.log(a)
if (!this.ApiStatus) {
await this.UserServiceImpl.EditUser(a)
}
await this.GetTableData();
this.isShowEditUser = false
}
/**
* 删除用户 接口
* @constructor
*/
public async DeleteUser(): Promise<void> {
MessageBox.confirm('确定删除该用户吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
let res = await this.UserServiceImpl.UserDelete({
id: this.clickCurrent.id
});
this.isShowaddNewUser = false;
await this.GetTableData();
}).catch(() => {});
}
/**
* 添加管理 接口
* @constructor
*/
public async AddUser(): Promise<void> {
this.setUserParams.member_id = 0;
let res = await this.UserServiceImpl.SetAddUser(this.setUserParams);
await this.GetTableData()
this.isShowaddNewUser = false
}
/**
* 获取用户列表 接口
* @constructor
*/
public async GetTableData(): Promise<void> {
let res = await this.UserServiceImpl.UserIndex(this.PageParams)
this.TotalCount = res.count;
this.TableData = res.list;
}
/**
* 获取角色类型 接口
* @constructor
*/
public async GetRoleIndex(): Promise<void> {
this.RoleList = await this.UserServiceImpl.RoleIndex({});
console.log("获取角色类型:", this.RoleList)
}
}

View File

@@ -0,0 +1 @@
b3f64e3f-ea8d-4b4c-b5bd-c7088292e4fa

View File

@@ -0,0 +1,16 @@
import { Component, Vue } from 'vue-property-decorator';
import { BaseLayout, RouterMeta } from "@layout/base.layout";
@Component
export default class About extends BaseLayout {
private RouterMeta: RouterMeta = {
title: '关于我',
isLogin: false
}
protected render() {
return (
<h2></h2>
)
}
}

View File

@@ -0,0 +1 @@
572dd144-54ff-422c-81b6-845e85994f42

Some files were not shown because too many files have changed in this diff Show More