添加链接
parent
9aa9cc2d15
commit
5363944ea3
|
|
@ -66,6 +66,7 @@
|
||||||
setFieldsValue({
|
setFieldsValue({
|
||||||
...data,
|
...data,
|
||||||
crops_ids: data.crops.map((e) => e.id),
|
crops_ids: data.crops.map((e) => e.id),
|
||||||
|
is_blank: data.is_blank == 1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,13 @@ export const columns: BasicColumn[] = [
|
||||||
title: '农业类型',
|
title: '农业类型',
|
||||||
dataIndex: 'industry_label',
|
dataIndex: 'industry_label',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '是否外部链接',
|
||||||
|
dataIndex: 'is_blank',
|
||||||
|
format: (text) => {
|
||||||
|
return text ? '是' : '否'
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '排序',
|
title: '排序',
|
||||||
dataIndex: 'sort',
|
dataIndex: 'sort',
|
||||||
|
|
@ -56,7 +63,7 @@ export const columns: BasicColumn[] = [
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed: undefined,
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -81,30 +88,26 @@ export const accountFormSchema: FormSchema[] = [
|
||||||
return !!values.id
|
return !!values.id
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// field: 'is_blank',
|
field: 'is_blank',
|
||||||
// label: '是否外部链接',
|
label: '外部链接',
|
||||||
// required: false,
|
required: true,
|
||||||
// component: 'Switch',
|
component: 'Switch',
|
||||||
// componentProps: {
|
componentProps: {
|
||||||
// checkedChildren: 1,
|
checkedChildren: '是',
|
||||||
// unCheckedChildren: 0,
|
unCheckedChildren: '否',
|
||||||
// },
|
},
|
||||||
// // render: ({ model, field }) => {
|
defaultValue: false,
|
||||||
// // console.log();
|
},
|
||||||
|
{
|
||||||
// // return model[field] ? '是' : '否'
|
field: 'blank_url',
|
||||||
// // },
|
label: '外部链接',
|
||||||
// },
|
required: true,
|
||||||
// {
|
component: 'Input',
|
||||||
// field: 'blank_url',
|
ifShow: ({ values }) => {
|
||||||
// label: '外部链接',
|
return !!values.is_blank
|
||||||
// required: false,
|
},
|
||||||
// component: 'Input',
|
},
|
||||||
// ifShow: ({ values }) => {
|
|
||||||
// return !!values.is_blank
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'industry_key',
|
field: 'industry_key',
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,6 @@
|
||||||
field: 'type',
|
field: 'type',
|
||||||
dynamicDisabled: true,
|
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({
|
await setFieldsValue({
|
||||||
...obj,
|
...obj,
|
||||||
agricultural_base_id: obj.base_id,
|
agricultural_base_id: obj.base_id,
|
||||||
|
|
|
||||||
|
|
@ -640,8 +640,6 @@
|
||||||
getInstance()?.on('click', async (e) => {
|
getInstance()?.on('click', async (e) => {
|
||||||
if (loading) return
|
if (loading) return
|
||||||
if (_seriesName.includes(e.seriesName)) {
|
if (_seriesName.includes(e.seriesName)) {
|
||||||
console.log(e)
|
|
||||||
|
|
||||||
loading = true
|
loading = true
|
||||||
historyMap.value.push({ type: 'nylx', value: e.data.key })
|
historyMap.value.push({ type: 'nylx', value: e.data.key })
|
||||||
await getData()
|
await getData()
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@
|
||||||
/>
|
/>
|
||||||
<LeftModal v-model:visible="leftMapModal" :footer="null" :type="leftType" />
|
<LeftModal v-model:visible="leftMapModal" :footer="null" :type="leftType" />
|
||||||
<RightModal v-model:visible="rightMapModal" :footer="null" :parmas="rightParmas" />
|
<RightModal v-model:visible="rightMapModal" :footer="null" :parmas="rightParmas" />
|
||||||
|
<IframeModal v-model:visible="iframeModal" :footer="null" :url="baseData.blank_url" />
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</ScaleScreen>
|
</ScaleScreen>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -88,16 +89,17 @@
|
||||||
import MapModal from './MapModal.vue'
|
import MapModal from './MapModal.vue'
|
||||||
import LeftModal from './LeftModal.vue'
|
import LeftModal from './LeftModal.vue'
|
||||||
import RightModal from './RightModal.vue'
|
import RightModal from './RightModal.vue'
|
||||||
|
import IframeModal from './components/IframeModal.vue'
|
||||||
import { createVContext } from './useVContext'
|
import { createVContext } from './useVContext'
|
||||||
import mitt from '/@/utils/mitt'
|
import mitt from '/@/utils/mitt'
|
||||||
import Build from './components/cavas'
|
import Build from './components/cavas'
|
||||||
import dayjs from 'dayjs'
|
// import dayjs from 'dayjs'
|
||||||
import { getWarningLogs } from '/@/api/sys/user'
|
import { getWarningLogs } from '/@/api/sys/user'
|
||||||
import { notification } from 'ant-design-vue'
|
import { notification } from 'ant-design-vue'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { computed } from '@vue/reactivity'
|
import { computed } from '@vue/reactivity'
|
||||||
// import Am from './components/Star'
|
// 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'
|
// const initTime = '2022-10-20 00:00'
|
||||||
localStorage.removeItem('warning_id')
|
localStorage.removeItem('warning_id')
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
@ -122,6 +124,7 @@
|
||||||
MapModal,
|
MapModal,
|
||||||
LeftModal,
|
LeftModal,
|
||||||
RightModal,
|
RightModal,
|
||||||
|
IframeModal,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const cavsRef = ref<HTMLDivElement | null>(null)
|
const cavsRef = ref<HTMLDivElement | null>(null)
|
||||||
|
|
@ -198,6 +201,7 @@
|
||||||
|
|
||||||
const leftMapModal = ref<boolean>(false)
|
const leftMapModal = ref<boolean>(false)
|
||||||
const rightMapModal = ref<boolean>(false)
|
const rightMapModal = ref<boolean>(false)
|
||||||
|
const iframeModal = ref<boolean>(false)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
updateSize()
|
updateSize()
|
||||||
|
|
@ -232,7 +236,11 @@
|
||||||
vEmitter.on('base:click', (e) => {
|
vEmitter.on('base:click', (e) => {
|
||||||
obj.baseId = e.id
|
obj.baseId = e.id
|
||||||
obj.baseData = e
|
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,
|
visibleMapModal,
|
||||||
leftMapModal,
|
leftMapModal,
|
||||||
rightMapModal,
|
rightMapModal,
|
||||||
|
iframeModal,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue