Commit f87fa266 authored by 田翔's avatar 田翔

fix: 台账选择器问题修复

parent e3be7fcf
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.6.0", "version": "5.6.1",
"description": "5.6.0 增加描述控件", "description": "5.6.1 台账选择器问题修复",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
"@babel/plugin-transform-modules-amd": "^7.14.5", "@babel/plugin-transform-modules-amd": "^7.14.5",
"@umijs/fabric": "^2.0.7", "@umijs/fabric": "^2.0.7",
"@wisdom-map/amap": "1.1.0-beta.42", "@wisdom-map/amap": "1.1.0-beta.42",
"@wisdom-map/arcgismap": "1.4.0-92", "@wisdom-map/arcgismap": "1.4.0-227",
"@wisdom-map/basemap": "1.1.0-18", "@wisdom-map/basemap": "1.1.0-37",
"babel-loader": "^8.2.2", "babel-loader": "^8.2.2",
"babel-plugin-import": "^1.13.3", "babel-plugin-import": "^1.13.3",
"check-prettier": "^1.0.3", "check-prettier": "^1.0.3",
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1666770499222" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18359" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M307.2 782.628571z" fill="#1685ff" p-id="18360"></path><path d="M958.171429 965.485714H65.828571c-21.942857 0-36.571429-14.628571-36.571428-36.571428s14.628571-36.571429 36.571428-36.571429H950.857143c21.942857 0 36.571429 14.628571 36.571428 36.571429s-14.628571 36.571429-29.257142 36.571428zM892.342857 175.542857l-109.714286-95.085714c-43.885714-36.571429-109.714286-21.942857-138.971428 14.628571-29.257143 21.942857-299.885714 343.771429-329.142857 373.028572-21.942857 21.942857-29.257143 51.2-43.885715 80.457143l-58.514285 204.8c-7.314286 29.257143 0 58.514286 21.942857 80.457142 14.628571 14.628571 29.257143 21.942857 51.2 21.942858 7.314286 0 21.942857 0 36.571428-7.314286L512 760.685714c29.257143-14.628571 43.885714-36.571429 65.828571-51.2 80.457143-95.085714 285.257143-351.085714 314.514286-373.028571 21.942857-21.942857 36.571429-51.2 36.571429-87.771429 0-29.257143-14.628571-58.514286-36.571429-73.142857zM526.628571 658.285714c-14.628571 14.628571-29.257143 29.257143-43.885714 36.571429l-197.485714 95.085714v-7.314286l58.514286-204.8c7.314286-29.257143 21.942857-43.885714 29.257142-58.514285C438.857143 438.857143 533.942857 329.142857 599.771429 248.685714l153.6 131.657143C665.6 482.742857 541.257143 636.342857 526.628571 658.285714z m314.514286-380.342857c-7.314286 7.314286-21.942857 21.942857-36.571428 43.885714L650.971429 190.171429c21.942857-21.942857 36.571429-43.885714 43.885714-43.885715 7.314286-7.314286 21.942857-14.628571 29.257143-14.628571 7.314286 0 7.314286 0 14.628571 7.314286l109.714286 95.085714c7.314286 7.314286 7.314286 14.628571 7.314286 21.942857 0 0 0 14.628571-14.628572 21.942857z" fill="#1685ff" p-id="18361"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1666767675430" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7853" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M958.171 285.257H73.143c-21.943 0-36.572-14.628-36.572-36.571s14.629-36.572 36.572-36.572h877.714c21.943 0 36.572 14.629 36.572 36.572s-14.629 36.571-29.258 36.571z m-570.514 724.114c-21.943 0-36.571-14.628-36.571-36.571V394.971c0-21.942 14.628-36.571 36.571-36.571s36.572 14.629 36.572 36.571V972.8c0 21.943-14.629 36.571-36.572 36.571z m212.114 0c-21.942 0-36.571-14.628-36.571-36.571V394.971c0-21.942 14.629-36.571 36.571-36.571s36.572 14.629 36.572 36.571V972.8c0 21.943-21.943 36.571-36.572 36.571z" fill="#FF4D4F" p-id="7854"></path><path d="M672.914 1024H336.457c-102.4 0-182.857-80.457-182.857-182.857V394.97c0-21.942 14.629-36.571 36.571-36.571s36.572 14.629 36.572 36.571v446.172c0 65.828 51.2 109.714 109.714 109.714H680.23c65.828 0 109.714-51.2 109.714-109.714V394.97c0-21.942 14.628-36.571 36.571-36.571s36.572 14.629 36.572 36.571v446.172C855.77 943.543 775.314 1024 672.914 1024z m-14.628-738.743c-21.943 0-36.572-14.628-36.572-36.571V131.657c0-36.571-29.257-58.514-58.514-58.514H453.486c-29.257 0-58.515 21.943-58.515 58.514v117.029c0 21.943-14.628 36.571-36.571 36.571s-36.571-14.628-36.571-36.571V131.657C321.829 58.514 380.343 0 453.486 0H563.2c73.143 0 131.657 58.514 131.657 131.657v117.029c0 21.943-14.628 36.571-36.571 36.571z" fill="#FF4D4F" p-id="7855"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1666767495592" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7140" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M453.485714 643.657143H219.428571c-21.942857 0-36.571429-14.628571-36.571428-36.571429s14.628571-36.571429 36.571428-36.571428h234.057143c21.942857 0 36.571429 14.628571 36.571429 36.571428s-14.628571 36.571429-36.571429 36.571429zM541.257143 380.342857H219.428571c-21.942857 0-36.571429-21.942857-36.571428-36.571428s14.628571-36.571429 36.571428-36.571429h321.828572c21.942857 0 36.571429 14.628571 36.571428 36.571429s-14.628571 36.571429-36.571428 36.571428z" p-id="7141" fill="#1685ff"></path><path d="M373.028571 958.171429H160.914286c-65.828571 0-117.028571-51.2-117.028572-117.028572v-658.285714c0-65.828571 51.2-117.028571 117.028572-117.028572h541.257143c65.828571 0 117.028571 51.2 117.028571 117.028572v204.8c0 21.942857-14.628571 36.571429-36.571429 36.571428s-36.571429-14.628571-36.571428-36.571428V182.857143c0-21.942857-21.942857-43.885714-43.885714-43.885714H160.914286c-21.942857 0-43.885714 21.942857-43.885715 43.885714v665.6c0 21.942857 21.942857 43.885714 43.885715 43.885714h212.114285c21.942857 0 36.571429 14.628571 36.571429 36.571429s-14.628571 29.257143-36.571429 29.257143z" p-id="7142" fill="#1685ff"></path><path d="M1009.371429 921.6l-87.771429-87.771429c21.942857-29.257143 36.571429-73.142857 36.571429-109.714285 0-58.514286-14.628571-109.714286-51.2-153.6-36.571429-43.885714-87.771429-65.828571-146.285715-73.142857-58.514286-7.314286-124.342857 14.628571-168.228571 51.2-36.571429 36.571429-58.514286 87.771429-65.828572 146.285714 0 58.514286 14.628571 109.714286 51.2 153.6 36.571429 43.885714 87.771429 65.828571 146.285715 73.142857h14.628571c43.885714 0 87.771429-14.628571 124.342857-36.571429l87.771429 87.771429c7.314286 7.314286 14.628571 7.314286 29.257143 7.314286s21.942857 0 29.257143-7.314286c14.628571-14.628571 14.628571-36.571429 0-51.2z m-277.942858-73.142857c-36.571429 0-73.142857-21.942857-95.085714-43.885714-21.942857-36.571429-36.571429-73.142857-36.571428-109.714286s14.628571-65.828571 43.885714-95.085714c29.257143-21.942857 58.514286-36.571429 95.085714-36.571429h7.314286c36.571429 0 73.142857 21.942857 95.085714 43.885714 21.942857 29.257143 36.571429 65.828571 36.571429 102.4 0 36.571429-14.628571 65.828571-43.885715 95.085715-29.257143 21.942857-58.514286 36.571429-95.085714 36.571428l-7.314286 7.314286z" p-id="7143" fill="#1685ff"></path></svg>
\ No newline at end of file
...@@ -10,9 +10,13 @@ import FileView from './components/FileView' ...@@ -10,9 +10,13 @@ import FileView from './components/FileView'
import CoordView from './components/CoordView' import CoordView from './components/CoordView'
import SelectView from './components/SelectView' import SelectView from './components/SelectView'
import ValueEdit from './components/ValueEdit' import ValueEdit from './components/ValueEdit'
import IconPack from '../../../components/IconPack' // import IconPack from '../../../components/IconPack'
import { isObject, isArray, getFieldInfo } from '../../../../utils' import { isObject, isArray, getFieldInfo } from '../../../../utils'
const IconBtn = (props) => {
return <div className={styles.iconBtn} type={props.type}></div>
}
const iconList = Object.keys(icons).filter((item) => typeof icons[item] === 'object') const iconList = Object.keys(icons).filter((item) => typeof icons[item] === 'object')
const TablePack = (props, ref) => { const TablePack = (props, ref) => {
...@@ -275,17 +279,17 @@ const TablePack = (props, ref) => { ...@@ -275,17 +279,17 @@ const TablePack = (props, ref) => {
//表格可编辑 //表格可编辑
if (isEdit) { if (isEdit) {
if (!notUse?.includes('del')) { if (!notUse?.includes('del')) {
array.push({ title: '删除', icon: <IconPack.ShanChu /> }) array.push({ title: '删除', icon: <IconBtn type='删除' /> })
} }
} else { } else {
if (!notUse?.includes('read')) { if (!notUse?.includes('read')) {
array.push({ title: '详情', icon: <IconPack.XiangQing />, }) array.push({ title: '详情', icon: <IconBtn type='详情' /> })
} }
if (!notUse?.includes('edit')) { if (!notUse?.includes('edit')) {
array.push({ title: '编辑', icon: <IconPack.BianJi /> }) array.push({ title: '编辑', icon: <IconBtn type='编辑' /> })
} }
if (!notUse?.includes('del')) { if (!notUse?.includes('del')) {
array.push({ title: '删除', icon: <IconPack.ShanChu /> }) array.push({ title: '删除', icon: <IconBtn type='删除' /> })
} }
} }
......
@import '~antd/es/style/themes/default.less'; @import '~antd/es/style/themes/default.less';
@imgSrc: '../../../../assets/images/accout';
.tablePack { .tablePack {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -110,3 +111,20 @@ ...@@ -110,3 +111,20 @@
} }
} }
} }
.iconBtn {
width: 16px;
height: 16px;
&[type='详情'] {
background: url('@{imgSrc}/XiangQing.svg');
background-size: 100% 100%;
}
&[type='编辑'] {
background: url('@{imgSrc}/BianJi.svg');
background-size: 100% 100%;
}
&[type='删除'] {
background: url('@{imgSrc}/ShanChu.svg');
background-size: 100% 100%;
}
}
\ No newline at end of file
...@@ -132,8 +132,8 @@ const AccountSelector = (props) => { ...@@ -132,8 +132,8 @@ const AccountSelector = (props) => {
fieldshine.forEach(v => { fieldshine.forEach(v => {
if (sun === v.toField) { if (sun === v.toField) {
const schema = addons.getSchemaByPath(`${child}.${sun}`); const schema = addons.getSchemaByPath(`${child}.${sun}`);
if (schema.widget === 'fileUpload') { if (['TextInput', 'fileUpload'].includes(schema.widget)) {
addons.setSchemaByPath(`${child}.${sun}`, { ...schema, otherFile: row[v.fromField] }); addons.setSchemaByPath(`${child}.${sun}`, { ...schema, otherValue: row[v.fromField] });
} else { } else {
addons.setValue(`${child}.${sun}`, row[v.fromField] || ''); addons.setValue(`${child}.${sun}`, row[v.fromField] || '');
} }
......
...@@ -28,9 +28,9 @@ const Device = (props) => { ...@@ -28,9 +28,9 @@ const Device = (props) => {
let clickref = useRef(null) let clickref = useRef(null)
let view = useRef(null) let view = useRef(null)
const getView = (mapObj, Map) => { const getView = (mapObj, Map, extentInfos, layersInfo) => {
setTimeout(() => { setTimeout(() => {
if (mapObj) { if (mapObj && layersInfo) {
view.current = mapObj view.current = mapObj
let arr = (value && value.split(',')) || [] let arr = (value && value.split(',')) || []
let obj = (arr.length === 2) ? { point: { x: Number(arr[0]), y: Number(arr[1]) } } : {} let obj = (arr.length === 2) ? { point: { x: Number(arr[0]), y: Number(arr[1]) } } : {}
...@@ -41,6 +41,7 @@ const Device = (props) => { ...@@ -41,6 +41,7 @@ const Device = (props) => {
}) })
} }
clickref.current = new ClickQuery({ clickref.current = new ClickQuery({
layersInfo,
view: view.current, view: view.current,
offsetX: -150, offsetX: -150,
offsetY: -310, offsetY: -310,
......
...@@ -48,6 +48,7 @@ const TextInput = (props) => { ...@@ -48,6 +48,7 @@ const TextInput = (props) => {
isStoreID, isStoreID,
textDefalut, textDefalut,
formDisabled, formDisabled,
otherValue
} = schema } = schema
const handleChange = (e) => { const handleChange = (e) => {
...@@ -147,6 +148,13 @@ const TextInput = (props) => { ...@@ -147,6 +148,13 @@ const TextInput = (props) => {
} }
}, [uniqueVerify, tableName, fieldName]) }, [uniqueVerify, tableName, fieldName])
useEffect(() => {
if (otherValue) {
setShowValue(otherValue)
onChange(otherValue)
}
}, [otherValue])
return ( return (
<div className={styles.textInput} isdisabled={JSON.stringify(disabled)}> <div className={styles.textInput} isdisabled={JSON.stringify(disabled)}>
<Input <Input
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment