Browse Source

优化

master
liujiangyong 2 years ago
parent
commit
7a13e8f740
  1. 6
      web/client/src/sections/organization/containers/authority.js
  2. 41
      web/client/src/sections/projectRegime/containers/information.js
  3. 2
      web/client/src/sections/projectRegime/containers/qrCode.js

6
web/client/src/sections/organization/containers/authority.js

@ -59,7 +59,8 @@ const Authority = (props) => {
{ {
depMessage.length ? depMessage.length ?
<Tree <Tree
height={clientHeight - 100} style={{ width: 272 }}
height={195}
defaultExpandedKeys={[depMessage[0].id]} defaultExpandedKeys={[depMessage[0].id]}
selectedKeys={depSelectedKeys} selectedKeys={depSelectedKeys}
onSelect={(selectedKeys, { selected, selectedNodes, node }) => { onSelect={(selectedKeys, { selected, selectedNodes, node }) => {
@ -86,7 +87,8 @@ const Authority = (props) => {
{ {
depUser.length ? depUser.length ?
<Tree <Tree
height={clientHeight - 100} // style={{ width: 272 }}
height={168}
defaultSelectedKeys={[depUser[0].id]} defaultSelectedKeys={[depUser[0].id]}
selectedKeys={userSelectedKeys} selectedKeys={userSelectedKeys}
onSelect={(selectedKeys, { selected, selectedNodes, node, event }) => { onSelect={(selectedKeys, { selected, selectedNodes, node, event }) => {

41
web/client/src/sections/projectRegime/containers/information.js

@ -21,9 +21,7 @@ const Information = (props) => {
const [pictureUrl, setPictureUrl] = useState() const [pictureUrl, setPictureUrl] = useState()
const [companyID, setCompanyId] = useState('') const [companyID, setCompanyId] = useState('')
const [select, setSelect] = useState([]) const [select, setSelect] = useState([])
var QRCode = require('qrcode') // var QRCode = require('qrcode')
useEffect(() => { useEffect(() => {
projectList(query) projectList(query)
@ -40,25 +38,24 @@ const Information = (props) => {
}) })
} }
const createQrCode = (name) => { // const createQrCode = (name) => {
let url = '' // let url = ''
QRCode.toDataURL(name, { // QRCode.toDataURL(name, {
errorCorrectionLevel: 'low', // errorCorrectionLevel: 'low',
type: 'image/png', // type: 'image/png',
quality: 0.3, // quality: 0.3,
margin: 2, // margin: 2,
maskPattern: 9, // maskPattern: 9,
width: 400, // width: 400,
color: { // color: {
dark: "#000000ff", // dark: "#000000ff",
light: "#ffffffff" // light: "#ffffffff"
} // }
}, function (err, v) { // }, function (err, v) {
url = v // url = v
}) // })
return url // return url
} // }
const columns = [ const columns = [
{ {

2
web/client/src/sections/projectRegime/containers/qrCode.js

@ -63,7 +63,7 @@ const QrCode = (props) => {
<Input placeholder="请输入点位名称" allowClear /> <Input placeholder="请输入点位名称" allowClear />
</Form.Item> </Form.Item>
<Form.Item wrapperCol={{}}> <Form.Item wrapperCol={{}}>
<Button type="primary" htmlType="submit"> <Button htmlType="submit">
搜索 搜索
</Button> </Button>
</Form.Item> </Form.Item>

Loading…
Cancel
Save