diff --git a/src/views/base/base-data/BaseDrawer.vue b/src/views/base/base-data/BaseDrawer.vue
index a75adcfa..f5ebef05 100644
--- a/src/views/base/base-data/BaseDrawer.vue
+++ b/src/views/base/base-data/BaseDrawer.vue
@@ -66,6 +66,7 @@
setFieldsValue({
...data,
crops_ids: data.crops.map((e) => e.id),
+ is_blank: data.is_blank == 1,
})
}
})
diff --git a/src/views/base/base-data/base.data.ts b/src/views/base/base-data/base.data.ts
index 28770676..dbe20fd2 100644
--- a/src/views/base/base-data/base.data.ts
+++ b/src/views/base/base-data/base.data.ts
@@ -11,6 +11,13 @@ export const columns: BasicColumn[] = [
title: '农业类型',
dataIndex: 'industry_label',
},
+ {
+ title: '是否外部链接',
+ dataIndex: 'is_blank',
+ format: (text) => {
+ return text ? '是' : '否'
+ },
+ },
{
title: '排序',
dataIndex: 'sort',
@@ -56,7 +63,7 @@ export const columns: BasicColumn[] = [
title: '操作',
dataIndex: 'action',
align: 'center',
- fixed: undefined,
+ fixed: 'right',
},
]
@@ -81,30 +88,26 @@ export const accountFormSchema: FormSchema[] = [
return !!values.id
},
},
- // {
- // field: 'is_blank',
- // label: '是否外部链接',
- // required: false,
- // component: 'Switch',
- // componentProps: {
- // checkedChildren: 1,
- // unCheckedChildren: 0,
- // },
- // // render: ({ model, field }) => {
- // // console.log();
-
- // // return model[field] ? '是' : '否'
- // // },
- // },
- // {
- // field: 'blank_url',
- // label: '外部链接',
- // required: false,
- // component: 'Input',
- // ifShow: ({ values }) => {
- // return !!values.is_blank
- // },
- // },
+ {
+ field: 'is_blank',
+ label: '外部链接',
+ required: true,
+ component: 'Switch',
+ componentProps: {
+ checkedChildren: '是',
+ unCheckedChildren: '否',
+ },
+ defaultValue: false,
+ },
+ {
+ field: 'blank_url',
+ label: '外部链接',
+ required: true,
+ component: 'Input',
+ ifShow: ({ values }) => {
+ return !!values.is_blank
+ },
+ },
{
field: 'industry_key',
diff --git a/src/views/system/links/LinksDrawer.vue b/src/views/system/links/LinksDrawer.vue
index 5bcf5e8b..8c3f2853 100644
--- a/src/views/system/links/LinksDrawer.vue
+++ b/src/views/system/links/LinksDrawer.vue
@@ -39,13 +39,6 @@
field: 'type',
dynamicDisabled: true,
})
- console.log({
- ...obj,
- agricultural_base_id: obj.base_id,
- is_show: isTrueFalse(obj.is_show),
- is_recommend: isTrueFalse(obj.is_recommend),
- [`content${obj.type}`]: obj.type == 2 ? [obj.content] : obj.content,
- })
await setFieldsValue({
...obj,
agricultural_base_id: obj.base_id,
diff --git a/src/views/visualization/components/Map.vue b/src/views/visualization/components/Map.vue
index cfb57ada..d1ae53f0 100644
--- a/src/views/visualization/components/Map.vue
+++ b/src/views/visualization/components/Map.vue
@@ -640,8 +640,6 @@
getInstance()?.on('click', async (e) => {
if (loading) return
if (_seriesName.includes(e.seriesName)) {
- console.log(e)
-
loading = true
historyMap.value.push({ type: 'nylx', value: e.data.key })
await getData()
diff --git a/src/views/visualization/index.vue b/src/views/visualization/index.vue
index 5bac5ad9..66403821 100644
--- a/src/views/visualization/index.vue
+++ b/src/views/visualization/index.vue
@@ -54,6 +54,7 @@
/>
+
@@ -88,16 +89,17 @@
import MapModal from './MapModal.vue'
import LeftModal from './LeftModal.vue'
import RightModal from './RightModal.vue'
+ import IframeModal from './components/IframeModal.vue'
import { createVContext } from './useVContext'
import mitt from '/@/utils/mitt'
import Build from './components/cavas'
- import dayjs from 'dayjs'
+ // import dayjs from 'dayjs'
import { getWarningLogs } from '/@/api/sys/user'
import { notification } from 'ant-design-vue'
import { debounce } from 'lodash-es'
import { computed } from '@vue/reactivity'
// import Am from './components/Star'
- const initTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
+ // const initTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
// const initTime = '2022-10-20 00:00'
localStorage.removeItem('warning_id')
export default defineComponent({
@@ -122,6 +124,7 @@
MapModal,
LeftModal,
RightModal,
+ IframeModal,
},
setup() {
const cavsRef = ref(null)
@@ -198,6 +201,7 @@
const leftMapModal = ref(false)
const rightMapModal = ref(false)
+ const iframeModal = ref(false)
onMounted(() => {
updateSize()
@@ -232,7 +236,11 @@
vEmitter.on('base:click', (e) => {
obj.baseId = e.id
obj.baseData = e
- visibleMapModal.value = true
+ if (e.is_blank && e.blank_url) {
+ iframeModal.value = true
+ } else {
+ visibleMapModal.value = true
+ }
})
})
@@ -251,6 +259,7 @@
visibleMapModal,
leftMapModal,
rightMapModal,
+ iframeModal,
}
},
})