Commit db226678 authored by zuoliyuan's avatar zuoliyuan

ws

parent 244aaaaf
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
</view> </view>
</template> </template>
<script> <script>
import {
getUsualList
} from "@/api/apply/apply.js";
export default { export default {
props: { props: {
config: { config: {
...@@ -35,6 +38,18 @@ ...@@ -35,6 +38,18 @@
this.initData() this.initData()
}, },
methods: { 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() { initData() {
this.option = JSON.parse(JSON.stringify(this.config.option)) this.option = JSON.parse(JSON.stringify(this.config.option))
let style; let style;
...@@ -52,43 +67,60 @@ ...@@ -52,43 +67,60 @@
} }
this.option.style = style this.option.style = style
this.option.labelFontSize = this.option.labelFontSize * 2 + 'rpx' this.option.labelFontSize = this.option.labelFontSize * 2 + 'rpx'
this.getUsualList()
this.key = +new Date() this.key = +new Date()
}, },
jump(item) { // jump(item) {
if (this.config.platform === 'mp') return // if (this.config.platform === 'mp') return
let url; // let url;
if (item.linkType == 1 && item.type == 3) { // if (item.linkType == 1 && item.type == 3) {
let data = { // let data = {
id: item.moduleId, // id: item.moduleId,
moduleId: item.moduleId, // moduleId: item.moduleId,
urlAddress: item.urlAddress, // urlAddress: item.urlAddress,
...JSON.parse(item.propertyJson) // ...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;
} }
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({ uni.navigateTo({
url: "/pages/portal/scanPortal/index?id=" + propertyJson.moduleId + url: "/pages/apply/dynamicModel/index?config=" +
"&portalType=1&fullName=" + this.jnpf.base64.encode(JSON.stringify(item)),
item.fullName, fail: (err) => {
fail: (err) => {}, this.$u.toast("暂无此页面");
},
}); });
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("暂无此页面")
}
})
},
} }
} }
</script> </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