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 ?
<Tree
height={clientHeight - 100}
style={{ width: 272 }}
height={195}
defaultExpandedKeys={[depMessage[0].id]}
selectedKeys={depSelectedKeys}
onSelect={(selectedKeys, { selected, selectedNodes, node }) => {
@ -86,7 +87,8 @@ const Authority = (props) => {
{
depUser.length ?
<Tree
height={clientHeight - 100}
// style={{ width: 272 }}
height={168}
defaultSelectedKeys={[depUser[0].id]}
selectedKeys={userSelectedKeys}
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 [companyID, setCompanyId] = useState('')
const [select, setSelect] = useState([])
var QRCode = require('qrcode')
// var QRCode = require('qrcode')
useEffect(() => {
projectList(query)
@ -40,25 +38,24 @@ const Information = (props) => {
})
}
const createQrCode = (name) => {
let url = ''
QRCode.toDataURL(name, {
errorCorrectionLevel: 'low',
type: 'image/png',
quality: 0.3,
margin: 2,
maskPattern: 9,
width: 400,
color: {
dark: "#000000ff",
light: "#ffffffff"
}
}, function (err, v) {
url = v
})
return url
}
// const createQrCode = (name) => {
// let url = ''
// QRCode.toDataURL(name, {
// errorCorrectionLevel: 'low',
// type: 'image/png',
// quality: 0.3,
// margin: 2,
// maskPattern: 9,
// width: 400,
// color: {
// dark: "#000000ff",
// light: "#ffffffff"
// }
// }, function (err, v) {
// url = v
// })
// return url
// }
const columns = [
{

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

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

Loading…
Cancel
Save