Skip to content

Commit

Permalink
Merge pull request #605 from dgiot/xxb
Browse files Browse the repository at this point in the history
feat:amisPage add
  • Loading branch information
dawnwinterLiu committed Oct 14, 2022
2 parents 84ec4c3 + 99bb1da commit 541bec3
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 14 deletions.
125 changes: 125 additions & 0 deletions src/views/CloudOc/AmisPage/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<!--
* @Author: dgiot-fe <dgiot@foxmail.com>
* @Date: 2022-03-29 20:02:43
* @LastEditors: 20:02
* @LastEditTime: 2022-03-29 20:02:43
* @Description:
* @FilePath: src\views\CloudOc\MetaData\index.vue
* @DocumentLink: https://dev.iotn2n.com
* @github: https://github.com/dgiot/dgiot-dashboard.git
* @name: index
-->
<template>
<div ref="custom-table" v-loading="loading" class="index-container">
<!-- 低代码表单渲染
append-to-body
:before-close="handleCloseAmis"
center
class="dialog_wrap"
custom-class="dialog_index"
top="5vh"
:visible.sync="commandInfo.dialog"
-->
<div v-show="commandInfo.dialog" class="dialog_wrap">
<dgiot-amis modal-append-to-body :schema="viewData" :show-help="false" />
</div>
</div>
</template>

<script>
import { getView } from '@/api/View'
import TableEdit from '@/views/DeviceCloud/empty/tableEdit'
export default {
name: 'Index',
components: {
TableEdit,
},
props: {},
data() {
return {
infoData: 'Empty',
isFullscreen: false,
border: true,
height: this.$baseTableHeight(0) - 40,
stripe: true,
lineHeight: 'mini',
list: [],
imageList: [],
listLoading: true,
layout: 'total, sizes, prev, pager, next, jumper',
total: 0,
selectRows: '',
pageNo: 1,
wlList: [],
wldialog: false,
ylList: [],
yldialog: false,
commandInfo: {
dialog: false,
},
activeName: '0',
product: [],
isPC: true,
loading: true,
viewData: {},
}
},
computed: {
dragOptions() {
return {
animation: 600,
group: 'description',
}
},
finallyColumns() {
return this.columns.filter((item) =>
this.checkList.includes(item.label)
)
},
},
watch: {},
async created() {
this.isPC = this.$ispc()
// this.fetchProduct()
// this.fetchData()
// console.log('是否是pc端', this.$ispc())
},
async mounted() {
let destId =
JSON.parse(Base64.decode(localStorage.getItem('role')))?.vuexinfo[0]
?.objectId || ''
let name =
JSON.parse(Base64.decode(localStorage.getItem('username')))?.vuexinfo ||
''
localStorage.setItem('parse_name', name)
localStorage.setItem('parse_deptid', destId)
let viewid = location.hash.split('/')[location.hash.split('/').length - 1]
const { data = {} } = await getView(viewid)
this.viewData = data
console.log('view表单', data)
if (JSON.stringify(this.viewData) != '{}') {
this.commandInfo.dialog = true
this.loading = false
} else {
this.$baseMessage(
'未找到该低代码模板',
'info',
'dgiot-hey-message-error'
)
}
},
destroyed() {},
}
</script>
<style lang="scss" scoped>
.index-container {
width: 100%;
height: 100%;
.dialog_wrap_item_content {
height: 100%;
width: 100%;
overflow: scroll;
}
}
</style>
19 changes: 7 additions & 12 deletions src/views/DeviceCloud/manage/js/proddetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -1279,18 +1279,20 @@ export default {
},
async queryProductInfo(productId) {
const res = await getProduct(productId)
localStorage.setItem('product_objectid', productId)
localStorage.setItem('parse_productid', productId)
let { thing = { properties: [], events: [], services: [], tags: [] } } =
res
_.merge({ properties: [], events: [], services: [], tags: [] }, thing)
let setThing = _.merge(
{ properties: [], events: [], services: [], tags: [] },
thing
)
let config = _.merge(res.config, this.productdetail.config)
// let config = _.merge(res.config, this.productdetail.config)
this.productObj = res
this.$set(this.productdetail, 'thing', thing)
this.$set(this.productdetail, 'config', config)
let config = { ...this.productdetail.config, ...res.config }
this.$set(this.productdetail, 'thing', this.productObj.thing)
this.$set(this.productdetail, 'config', this.productObj.config)
// this.productdetail.config = config
this.modules.data = setThing //setThing
// this.productdetail.thing = setThing //setThing
// this.productdetail.config = res.config
Expand Down Expand Up @@ -3389,18 +3391,11 @@ export default {
this.FromMachine = [{ name: 'ALL' }]
this.$get_object('Product', this.productId)
.then((response) => {
dgiotlog.log('response', response)
// console.log('response', response)
if (response) {
this.productInfo = _.merge(response, {
decoder: { code: '' },
thing: { properties: [] },
config: {
address: '余杭区良渚平高创业城c1座',
location: {
longitude: '120.161324',
latitude: '30.262441',
},
},
})
this.productName = response.name
for (var key in response) {
Expand Down
4 changes: 2 additions & 2 deletions src/views/MultiTenant/roles/list/addroles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
</el-button> -->
</span>
</el-form-item>
<el-form-item label="岗位" prop="dictvalue">
<el-form-item label="模板" prop="dictvalue">
<el-select
v-model="roleFormObj.dictvalue"
:clearable="clearFlag"
placeholder="请选择角色模版"
placeholder="请选择部门模版"
style="width: 100%"
>
<el-option
Expand Down

1 comment on commit 541bec3

@vercel
Copy link

@vercel vercel bot commented on 541bec3 Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dgiot-dashboard – ./

dgiot-dashboard-dgiot.vercel.app
dgiot-dashboard.vercel.app
dgiot-dashboard-git-master-dgiot.vercel.app

Please sign in to comment.