Browse Source

培训资料库左侧 图标隐藏实现

master
周沫沫历险记 2 years ago
parent
commit
6b872c8b6a
  1. 7
      .vscode/launch.json
  2. 61
      api/app/lib/models/training_information_level.js
  3. 115
      api/app/lib/models/training_information_record.js
  4. 1
      api/package.json
  5. 58
      web/client/src/sections/humanAffairs/containers/resourceRepository.jsx
  6. 43
      web/client/src/sections/humanAffairs/style.less

7
.vscode/launch.json

@ -17,11 +17,12 @@
"-f http://localhost:4700",
//
"-g postgres://postgres:123@10.8.30.166:5432/hr-dev",
"--redisHost 10.8.30.112",
"--redisHost localhost",
"--redisPort 6379",
// "--apiEmisUrl http://10.8.30.112:14000",
"--apiEmisUrl http://localhost:14000",
//
"--apiEmisUrl http://10.8.30.161:1111",
// "--apiEmisUrl http://10.8.30.161:1111",
// "--redisHost 10.8.30.112",
"--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5",
"--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa",
"--qnbkt dev-hr",

61
api/app/lib/models/training_information_level.js

@ -0,0 +1,61 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const TrainingInformationLevel = sequelize.define("trainingInformationLevel", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "type",
autoIncrement: false
},
departmentname: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "departmentname",
autoIncrement: false
},
traindate: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "traindate",
autoIncrement: false
},
origin: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "origin",
autoIncrement: false
}
}, {
tableName: "training_information_level",
comment: "",
indexes: []
});
dc.models.TrainingInformationLevel = TrainingInformationLevel;
return TrainingInformationLevel;
};

115
api/app/lib/models/training_information_record.js

@ -0,0 +1,115 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const TrainingInformationRecord = sequelize.define("trainingInformationRecord", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "type",
autoIncrement: false
},
departmentname: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "departmentname",
autoIncrement: false
},
traindate: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "traindate",
autoIncrement: false
},
filetype: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "filetype",
autoIncrement: false
},
filename: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "filename",
autoIncrement: false
},
filesize: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "filesize",
autoIncrement: false
},
updatedate: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "updatedate",
autoIncrement: false
},
attachpath: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "attachpath",
autoIncrement: false
},
origin: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "origin",
autoIncrement: false
},
traininginformationlevelid: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "traininginformationlevelid",
autoIncrement: false
}
}, {
tableName: "training_information_record",
comment: "",
indexes: []
});
dc.models.TrainingInformationRecord = TrainingInformationRecord;
return TrainingInformationRecord;
};

1
api/package.json

@ -38,6 +38,7 @@
"uuid": "^3.3.2"
},
"devDependencies": {
"freesun-sequelize-automate": "^1.0.5",
"mocha": "^6.0.2"
}
}

58
web/client/src/sections/humanAffairs/containers/resourceRepository.jsx

@ -1,14 +1,21 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Button, Col, Row, Input, Tree, Table, Space } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
import { IconSearch, IconEditStroked, IconMinusCircleStroked, IconPlusCircleStroked } from '@douyinfe/semi-icons';
import '../style.less'
const ResourceRepository = (props) => {
const { dispatch, actions, clientHeight } = props;
const treeData = [
{
label: '亚洲',
label: (<div>
<span>亚洲</span>
<span className='tree-icon'>
<IconEditStroked size='default' onClick={() => alert("bianji")} />
<IconMinusCircleStroked size='default' onClick={() => alert("sahnchu")}/>
<IconPlusCircleStroked size='default' onClick={() => alert("+")}/></span>
</div>
),
value: 'Asia',
key: '0',
children: [
@ -54,53 +61,6 @@ const ResourceRepository = (props) => {
],
},
],
}, {
label: '亚洲',
value: 'Asia',
key: '3',
children: [
{
label: '中国',
value: 'China',
key: '0-0',
children: [
{
label: '北京',
value: 'Beijing',
key: '0-0-0',
},
{
label: '上海',
value: 'Shanghai',
key: '0-0-1',
},
],
},
],
},
{
label: '北美洲',
value: 'North America',
key: '4',
children: [
{
label: '中国',
value: 'China',
key: '0-0',
children: [
{
label: '北京',
value: 'Beijing',
key: '0-0-0',
},
{
label: '上海',
value: 'Shanghai',
key: '0-0-1',
},
],
},
],
}
];

43
web/client/src/sections/humanAffairs/style.less

@ -1,32 +1,51 @@
.semi-table{
.semi-table-row:first-child{
.semi-table-row-head{
.semi-table {
.semi-table-row:first-child {
.semi-table-row-head {
background: #F2F3F5;
color: #4A4A4A;
font-size: 14px;
}
}
}
.resourceRepository{
.resourceRepository {
margin-top: 20px;
.left{
.semi-input-wrapper{
.left {
.semi-input-wrapper {
width: 260px;
}
.semi-tree-wrapper{
.semi-tree-wrapper {
margin-top: 20px;
}
.tree-icon {
padding-left: 6px;
opacity: 0;
.semi-icon {
padding-left: 6px;
}
}
.tree-icon:hover {
opacity: 1;
}
}
.right{
.path-lable{
.right {
.path-lable {
margin-bottom: 20px;
}
.semi-input-wrapper{
.semi-input-wrapper {
margin-bottom: 20px;
}
}
.semi-button{
.semi-button {
margin-bottom: 20px;
}
}
}
Loading…
Cancel
Save