添加链接
parent
9aa9cc2d15
commit
5363944ea3
|
|
@ -66,6 +66,7 @@
|
|||
setFieldsValue({
|
||||
...data,
|
||||
crops_ids: data.crops.map((e) => e.id),
|
||||
is_blank: data.is_blank == 1,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
/>
|
||||
<LeftModal v-model:visible="leftMapModal" :footer="null" :type="leftType" />
|
||||
<RightModal v-model:visible="rightMapModal" :footer="null" :parmas="rightParmas" />
|
||||
<IframeModal v-model:visible="iframeModal" :footer="null" :url="baseData.blank_url" />
|
||||
<!-- </div> -->
|
||||
</ScaleScreen>
|
||||
</template>
|
||||
|
|
@ -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<HTMLDivElement | null>(null)
|
||||
|
|
@ -198,6 +201,7 @@
|
|||
|
||||
const leftMapModal = ref<boolean>(false)
|
||||
const rightMapModal = ref<boolean>(false)
|
||||
const iframeModal = ref<boolean>(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,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue