Commit db226678 authored by zuoliyuan's avatar zuoliyuan

ws

parent 244aaaaf
......@@ -18,6 +18,9 @@
</view>
</template>
<script>
import {
getUsualList
} from "@/api/apply/apply.js";
export default {
props: {
config: {
......@@ -35,6 +38,18 @@
this.initData()
},
methods: {
getUsualList() {
getUsualList(2).then((res) => {
this.option.appDefaultValue = res.data.list.map((o) => {
const objectData = o.objectData ? JSON.parse(o.objectData) : {};
return {
...o,
...objectData,
};
});
console.log(this.option.appDefaultValue, 'usualList')
});
},
initData() {
this.option = JSON.parse(JSON.stringify(this.config.option))
let style;
......@@ -52,43 +67,60 @@
}
this.option.style = style
this.option.labelFontSize = this.option.labelFontSize * 2 + 'rpx'
this.getUsualList()
this.key = +new Date()
},
jump(item) {
if (this.config.platform === 'mp') return
let url;
if (item.linkType == 1 && item.type == 3) {
let data = {
id: item.moduleId,
moduleId: item.moduleId,
urlAddress: item.urlAddress,
...JSON.parse(item.propertyJson)
}
url = '/pages/apply/dynamicModel/index?config=' +
this.jnpf.base64.encode(JSON.stringify(data))
} else if (item.linkType == 1 && item.type == 2) {
url = item.urlAddress
} else if (item.linkType == 1 && item.type == 8) {
let propertyJson = JSON.parse(item.propertyJson)
uni.navigateTo({
url: "/pages/portal/scanPortal/index?id=" + propertyJson.moduleId +
"&portalType=1&fullName=" +
item.fullName,
fail: (err) => {},
});
return
} else {
if (!item.urlAddress) return
url = '/pages/apply/externalLink/index?url=' + encodeURIComponent(item.urlAddress) +
'&fullName= ' + item.fullName
// jump(item) {
// if (this.config.platform === 'mp') return
// let url;
// if (item.linkType == 1 && item.type == 3) {
// let data = {
// id: item.moduleId,
// moduleId: item.moduleId,
// urlAddress: item.urlAddress,
// ...JSON.parse(item.propertyJson)
// }
// url = '/pages/apply/dynamicModel/index?config=' +
// this.jnpf.base64.encode(JSON.stringify(data))
// } else if (item.linkType == 1 && item.type == 2) {
// url = item.urlAddress
// } else if (item.linkType == 1 && item.type == 8) {
// let propertyJson = JSON.parse(item.propertyJson)
// uni.navigateTo({
// url: "/pages/portal/scanPortal/index?id=" + propertyJson.moduleId +
// "&portalType=1&fullName=" +
// item.fullName,
// fail: (err) => {},
// });
// return
// } else {
// if (!item.urlAddress) return
// url = '/pages/apply/externalLink/index?url=' + encodeURIComponent(item.urlAddress) +
// '&fullName= ' + item.fullName
// }
// uni.navigateTo({
// url: url,
// fail: (err) => {
// // this.$u.toast("暂无此页面")
// }
// })
// },
// 之前是直接写死,现在,重新写了,将“工作台”菜单的“常用功能”移到“首页”了
jump(item){
if (item.type == 3) {
if (!item.moduleId) {
this.$u.toast("暂无此页面");
return;
}
uni.navigateTo({
url: url,
url: "/pages/apply/dynamicModel/index?config=" +
this.jnpf.base64.encode(JSON.stringify(item)),
fail: (err) => {
// this.$u.toast("暂无此页面")
}
})
this.$u.toast("暂无此页面");
},
});
}
}
}
}
</script>
......
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