| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- const { createApp, ref ,onMounted,createVNode, render} = Vue
- createApp({
- setup() {
- onMounted(()=>{
- // Class()
-
- if (tool.getQueryParam('type')) {
- param.value.content.where.class = tool.getQueryParam('type')
- axt_class.value = {value:tool.getQueryParam('type'),remarks:tool.getQueryParam('type')}
- }
- listData()
- getProductDetailData()
- })
- const data = ref([])
- const pageTotal = ref(0)
- const pageNumber = ref(0)
- const param = ref({
- id:20240920101703,
- content:{
- siteid:"HY",
- brandids:[],
- pageNumber:1,
- pageSize:50,
- where:{
- "isonsale":1,
- "condition":"",
- "class":''
- }
- }
- })
- const listData = async (id)=>{
-
- const res = await instance.post('',param.value)
- data.value = res.data.data
- pageTotal.value = res.data.pageTotal
- pageNumber.value = res.data.pageNumber
- }
-
- const pageChange = (page)=>{
- if (page < 1) return false
- if (page > pageTotal.value) return false
- param.value.content.pageNumber = page
- listData()
- }
- const classData = ref([
- {value:'暖通系统',remarks:'暖通系统'},
- {value:'水务系统',remarks:'水务系统'},
- {value:'消防系统',remarks:'消防系统'},
- {value:'液冷系统',remarks:'液冷系统'}
- ])
- const axt_class = ref({value:'暖通系统',remarks:'暖通系统'})
- const Class = async (id)=>{
- const res = await instance.post('',{
- "classname": "sysmanage.develop.optiontype.optiontype",
- "method": "optiontypeselect",
- "content": {
- "pageNumber": 1,
- "pageSize": 1000,
- "typename": 'marketproductclass',
- "parameter": {},
- }
- })
- classData.value = res.data.data
-
- }
- const classDataChild = ref([])
- const showClassChild = (cls)=>{
- classDataChild.value = cls.subdep
- axt_class.value = cls
- param.value.content.where.class = cls.value
- listData(param.value.content.pageNumber = 1)
- }
- const child_act = ref('')
- const childClick = (child)=>{
- child_act.value = child
- param.value.content.where.class = child
- listData(param.value.content.pageNumber = 1)
- }
- const linkOf = (url)=>{
- window.location.href = url
- }
- const productDetailData = ref({
- attinfos:[]
- })
- const getProductDetailData = async ()=>{
- const res = await instance.post('',{
- "id": "20240920101403",
- "content": {
- siteid:'HY',
- sa_fadid:tool.getQueryParam('id')
- }
- })
- if (res.data.code == 1) {
- productDetailData.value = res.data.data
- tool.modulesClick('服务支持',productDetailData.value.itemname)
- }
- }
- const tab1 = ref('xs')
- return {
- param,
- listData,
- data,
- pageTotal,
- pageNumber,
- pageChange,
- classData,
- axt_class,
- showClassChild,
- classDataChild,
- linkOf,
- productDetailData,
- tab1,
- child_act,
- childClick
- }
- }
- }).mount('#app')
|