Skip to content

Commit

Permalink
fix: 应用管理修复
Browse files Browse the repository at this point in the history
  • Loading branch information
dawnwinterLiu committed Sep 7, 2022
1 parent cca25ac commit 6a48bdc
Show file tree
Hide file tree
Showing 61 changed files with 308 additions and 4,564 deletions.
2 changes: 1 addition & 1 deletion src/dgiot/components/DgiotAmis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
type: 'page',
body: {
type: 'tpl',
tpl: 'Hello World!',
tpl: ' ',
},
}
export default {
Expand Down
2 changes: 1 addition & 1 deletion src/dgiot/components/DgiotAvatar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
async created() {},
mounted() {
console.log('window.name\n', window.name)
// console.log('window.name\n', window.name)
// document.getElementsByTagName('link')[0].href = this.avatar
},
methods: {
Expand Down
2 changes: 0 additions & 2 deletions src/dgiot/components/DgiotHeader/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@
'%c option',
'color:#009a61; font-size: 28px; font-weight: 300'
)
console.log(this.option)
console.groupEnd()
dgiotlogger.info('MqttConnect', this.option)
await this.$dgiotBus.$emit('MqttConnect', this.option)
Expand Down
2 changes: 0 additions & 2 deletions src/dgiot/components/DgiotNav/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@
'%c option',
'color:#009a61; font-size: 28px; font-weight: 300'
)
console.log(this.option)
console.groupEnd()
dgiotlogger.info('MqttConnect', this.option)
await this.$dgiotBus.$emit('MqttConnect', this.option)
Expand Down
1 change: 1 addition & 0 deletions src/i18n/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,7 @@ export default {
'alert number': '告警编号',
'the starting time': '告警时间',
'Alarm handling': '告警处理',
'Alarm remark': '备注',
'Alarm status': '告警状态',
isprocess: '是否处理',
'Data request successfully': '数据请求成功',
Expand Down
4 changes: 2 additions & 2 deletions src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ const actions = {
},
_userInfo
)
console.log('查看数据', data)
// console.log('查看数据', data)
const { sessionToken = '', roles = [], objectId = '' } = data
console.log('不是pc端', isPC())
// console.log('不是pc端', isPC())
if (!isPC()) {
window.jstoken?.setJsToken(
window.location.hostname,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/dgiotLog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function printDgiotlog(option, message) {
console[level] || dgiotlog.log,
console
)
log.apply(console, logArgs.concat(message))
// log.apply(console, logArgs.concat(message))
}
function time(label, timeFn, dgiotlogOption) {
var startTime = Date.now()
Expand Down
2 changes: 0 additions & 2 deletions src/views/CloudFunction/engine/components/DynamicForms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,6 @@
dgiotlogger.log('properties', properties)
},
async onSubmit() {
console.log(this.ruleContent)
console.log('submit!')
const res = await sqlTpl(
_.merge(this.ruleContent, {
productid: this.$route.query.productid
Expand Down
5 changes: 0 additions & 5 deletions src/views/CloudFunction/lowcode/components/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
const amisEnv = {}
const { type, data, objectId, class: _class } = params
if (_class == 'Device') {
console.log(data)
// const { headers = { store: 'localStorage' } } = data.initApi
// 设置amis中的变量参数。
// 目前只设置了parse_objectid
Expand All @@ -78,7 +77,6 @@
`%c amis env`,
'color:#009a61; font-size: 28px'
)
console.log('amisEnv', amisEnv)
console.groupEnd()
}
this.designLowCode(type, objectId, data)
Expand Down Expand Up @@ -127,9 +125,6 @@
* @return {Promise<void>}
*/
async designLowCode(type, objectId, data) {
console.log(type)
console.log(data)
console.log(objectId)
this.code = data
this.type = type
this.objectId = objectId
Expand Down
24 changes: 0 additions & 24 deletions src/views/CloudFunction/topo/VueKonva.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@
removeShape(node) {
let _this = this
const Layer = _this.stage.find('Layer')[0]
console.log('删除的节点', node)
var Image = _this.stage.find('Image')
var tweens = []
for (var n = 0; n < tweens.length; n++) {
Expand All @@ -246,8 +245,6 @@
Image.each((shape) => {
console.log('图片相关', shape)
if (shape.attrs.id == node.attrs.id) {
console.log(shape, 'shape.target 找到了这个node 节点')
console.log(node, 'shape.target 找到了这个node 节点')
shape.remove()
shape.destroy()
node.remove()
Expand Down Expand Up @@ -449,7 +446,6 @@
// console.log('11111111')
await putProduct(productid, params)
.then((res) => {
console.log(res, '产品组态更新成功')
// this.handleCloseSub()
this.$message({
showClose: true,
Expand Down Expand Up @@ -484,21 +480,16 @@
// this.mqttMsg(payload)
let decodeMqtt
let updataId = []
console.log('收到消息', Msg)
if (!isBase64(Msg)) {
console.log('非base64数据类型')
return
} else {
decodeMqtt = JSON.parse(Base64.decode(Msg))
console.log('消息解密消息', decodeMqtt)
}
console.log(decodeMqtt.konva)
const Shape = decodeMqtt.konva
// apply transition to all nodes in the array
// Text.each(function (shape) {
const Text = _this.stage.find('Text')
console.log(Text)
const tweens = []
for (var n = 0; n < tweens.length; n++) {
tweens[n].destroy()
Expand All @@ -507,8 +498,6 @@
Shape.each((i) => {
Text.each((shape) => {
if (i.id == shape.attrs.id) {
console.log('更新节点', i)
console.log(shape)
shape.text(i.text)
tweens.push(
new Konva.Tween({
Expand All @@ -523,14 +512,8 @@
})
})
if (updataId) {
console.log('以下组态id未更新', updataId)
}
_this.stage.batchDraw()
console.log('konva数据更新成功')
// _this.updataProduct(this.productid)
})
// Websocket.add_hook(channeltopic, (Msg) => {
Expand Down Expand Up @@ -597,9 +580,7 @@
retained: true,
qos: 2,
}
console.log('sendInfo', sendInfo)
if (_this.$refs.topoheader) {
console.log('订阅mqtt')
_this.$refs.topoheader.handleCloseSub(sendInfo)
}
const {
Expand All @@ -619,13 +600,11 @@
where: { objectId: _this.$route.query.productid },
})
_this.productconfig = results[0]
console.log(_this.productconfig)
if (message == 'SUCCESS') {
// console.log(this.$refs['edrawer'].$refs, 'edrawer')
_this.$refs['operation']
? (_this.$refs['operation'].productconfig = results[0])
: console.log(' _this.$refs[\'operation\']', _this.$refs['operation'])
console.log(data.Stage.attrs.id)
_this.globalStageid = data.Stage.attrs.id
_this.createKonva(data, _this.globalStageid, 'create')
_this.paramsconfig = { konva: data }
Expand All @@ -635,16 +614,13 @@
},
// js 绘制
createKonva(data, globalStageid, type) {
console.log('type', type)
let Stage
let _this = this
if (type != 'create') {
Stage = data
} else {
Stage = data.Stage
}
console.log(data)
console.log(Stage.attrs.height, Stage.attrs.width, '450')
Stage.attrs.height = _this.stageConfig.height
Stage.attrs.width = _this.stageConfig.width
console.log(Stage.attrs.height, Stage.attrs.width, '453')
Expand Down
24 changes: 0 additions & 24 deletions src/views/CloudFunction/topo/components/Amis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
this.nodeAttr.visible = false
this.$dgiotBus.$off('nodeInfo')
this.$dgiotBus.$on('nodeInfo', (args) => {
console.log(args.attrs.amis_id, 'nodeInfo')
if (this.$route.query.deviceid) {
localStorage.setItem('parse_objectid', this.$route.query.deviceid)
this.quertAmis(args.attrs.amis_id)
Expand Down Expand Up @@ -173,7 +172,6 @@
this.viewInfo = data
},
async bind_amis(args) {
console.log(args.objectId, this.amisNode.node)
this.amisNode.node.setAttrs({
fill: 'red',
bind_amis: true,
Expand All @@ -196,7 +194,6 @@
type: 'success',
})
this.amisLoading = false
console.log(args, this.amisNode.node)
},
async bindAmis(args) {
const loading = this.$baseLoading()
Expand All @@ -212,15 +209,13 @@
type: 'amis',
},
})
console.log(amisDict, args)
this.amisDict = amisDict
this.amisCount = count
this.nodeAttr.visible = false
this.amisLoading = true
loading.close()
},
async preview_amis(args) {
console.log(args)
await this.quertAmis(args.objectId)
},
async goDesign() {
Expand Down Expand Up @@ -248,12 +243,9 @@
this.$dgiotBus.$emit('refresh', this.$route)
},
updataForm(from) {
console.log('子组件改变的值')
console.log(from)
this.setSizeForm(from)
},
addDas() {
console.log(this.sizeForm)
this.sizeForm.daslist.push({
addr: '',
})
Expand All @@ -266,28 +258,20 @@
},
// 提交
submitForm(obj) {
console.log('sizeForm', obj)
console.log('thingType', this.thingType)
console.log('toponobound', this.toponobound)
console.log('topokonvathing', this.topokonvathing)
console.info('如果type是put 走put,否则post')
// 判断 里是否有这个identifier
if (_.isEmpty(this.topokonvathing) == true) this.thingType = 'post'
else this.thingType = 'put'
this.toponobound.forEach((item) => {
console.log(obj.identifier, item.identifier, 'identifier')
if (obj.identifier == item.identifier) {
this.thingType = 'put'
}
})
console.log('thingType', this.thingType)
let data = {
item: obj,
productid: this.$route.query.productid,
}
if (this.thingType == 'post') {
postThing(data).then((res) => {
console.log('编辑', res)
if (res.code == 200) {
this.$message({
showClose: true,
Expand All @@ -302,7 +286,6 @@
shapeid: this.shapeid,
}
edit_konva_thing(params).then((res) => {
console.log(res)
// this.handleCloseSub()
})
this.wmxhandleClose()
Expand All @@ -317,7 +300,6 @@
})
} else {
putThing(data).then((res) => {
console.log('编辑', res)
if (res.code == 200) {
this.$message({
showClose: true,
Expand All @@ -332,7 +314,6 @@
shapeid: this.shapeid,
}
edit_konva_thing(params).then((res) => {
console.log(res)
// this.handleCloseSub()
})
this.wmxhandleClose()
Expand Down Expand Up @@ -389,7 +370,6 @@
loading.close()
} catch (e) {
loading.close()
console.log(e)
}
},
async bindTopo(args) {
Expand All @@ -400,7 +380,6 @@
productid: args.id.split('_')[0],
text: args.text,
}
console.log('args', args)
try {
// const { thing={},config } = await getProduct(args.id.split('_')[0])
let params = {
Expand All @@ -425,12 +404,9 @@
return
}
const { konvathing = {}, nobound = [] } = data
console.log(konvathing, 'konvathing')
console.log(nobound, 'nobound')
this.toponobound = nobound
this.topokonvathing = konvathing
if (Object.values(konvathing).length > 0) {
console.log(`物模型存在这个属性`, konvathing)
this.reset(nobound)
var obj = {}
var daslist = []
Expand Down
Loading

1 comment on commit 6a48bdc

@vercel
Copy link

@vercel vercel bot commented on 6a48bdc Sep 7, 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-git-master-dgiot.vercel.app
dgiot-dashboard-dgiot.vercel.app
dgiot-dashboard.vercel.app

Please sign in to comment.