Commit d2979f5c authored by 程恺文's avatar 程恺文

修改

parent ff0827d6
Pipeline #79921 passed with stages
......@@ -35,6 +35,10 @@ import { get, PUBLISH_SERVICE } from '@/services';
import PreviewModal from './PreviewModal';
import CryptoJS from 'crypto-js';
const { Item } = Form;
const controlBarObj={
'停靠' :'dock',
'隐藏':'hide'
}
const modules = {
toolbar: [
[{ header: [1, 2, 3, 4, 5, 6, false] }],
......@@ -60,6 +64,7 @@ const AddModal = props => {
const [loading, setLoading] = useState(false);
const [radio, setRadio] = useState();
const [radio1, setRadio1] = useState();
const [radio2, setRadio2] = useState();
const [identity, setIdentity] = useState(0);
const [flag, setFlag] = useState(1);
const [form] = Form.useForm();
......@@ -92,6 +97,7 @@ const AddModal = props => {
getMap();
if (type === 'edit') {
setRadio(pickItem.target != 0);
setRadio2(pickItem.controlBar != 'hide');
setRadio1(pickItem.isMaster);
setIdentity(pickItem.siteType);
setAccount(pickItem.accountType);
......@@ -108,6 +114,7 @@ const AddModal = props => {
subtitle: pickItem.Subtitle,
accountType: pickItem.accountType,
target: pickItem.target != 0,
controlBar:pickItem.controlBar != 'hide',
isMaster: pickItem.isMaster,
images: pickItem.images,
siteDescription: pickItem.siteDescription,
......@@ -166,6 +173,7 @@ const AddModal = props => {
form.setFieldsValue({
accountParamValue: '熊猫ticket',
target: 0,
controlBar:true,
isMaster: false,
mapSetting: '',
coordinate: '',
......@@ -353,6 +361,7 @@ const AddModal = props => {
// 提交
const onSubmit = () => {
form.validateFields().then(validate => {
console.log(validate,radio2,'validate');
if (validate) {
setLoading(true);
let obj = form.getFieldsValue();
......@@ -415,6 +424,7 @@ const AddModal = props => {
accountType: account,
isHide: false,
target: radio ? 1 : 0,
controlBar:radio2?'dock':'hide',
isMaster: obj.isMaster,
images: dataList,
mapSetting: obj.mapSetting,
......@@ -459,6 +469,7 @@ const AddModal = props => {
iconUrl: obj.iconUrl,
accountType: account,
target: radio ? 1 : 0,
controlBar:radio2?'dock':'hide',
isMaster: obj.isMaster,
images: dataList,
siteType: obj.siteType,
......@@ -512,7 +523,9 @@ const AddModal = props => {
const onChange1 = e => {
setRadio1(e);
};
const onChange2 = e => {
setRadio2(e);
};
const beforeUpload = file => {
const isJpgOrPng =
file.type === 'image/jpeg' ||
......@@ -762,6 +775,9 @@ const AddModal = props => {
<Item label="新标签" name="target">
<Switch checkedChildren="是" unCheckedChildren="否" checked={radio} onChange={onChange} />
</Item>
<Item label="控制台" name="controlBar">
<Switch checkedChildren="停靠" unCheckedChildren="隐藏" checked={radio2} onChange={onChange2} />
</Item>
<Row>
<Col span={10}>
<Item
......
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