Skip to content

Commit

Permalink
fix: 云检测修复
Browse files Browse the repository at this point in the history
  • Loading branch information
dawnwinterLiu committed Jul 20, 2022
1 parent b149df0 commit 3f4df6a
Show file tree
Hide file tree
Showing 11 changed files with 157 additions and 251 deletions.
5 changes: 0 additions & 5 deletions src/api/Dlink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ export async function postTopic(Topic = '$dg/user/router/') {
: Topic,
splitTopicKey: typeof Topic == 'string' ? Topic.split('/')[2] : Topic,
}
console.groupCollapsed(
` href: ${mqttInfo.href} \n topic: ${mqttInfo.topic} \n topicKey: ${mqttInfo.topicKey} \n splitTopicKey: ${mqttInfo.splitTopicKey}`
)
console.table(mqttInfo)
console.groupEnd()
// MqttSubscribe
window.mqttInfo = window.dgiot.mqttInfo = mqttInfo
Vue.prototype.$mqttInfo = mqttInfo
Expand Down
10 changes: 0 additions & 10 deletions src/utils/request/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,6 @@ instance.interceptors.request.use(
config.url.indexOf('/classes/') == 0 &&
!ignoreApi.some((item) => config.url.includes(item))
) {
console.groupCollapsed(
`%c部门切换token拦截url日志`,
'color:black; font-size: 18px; font-weight: 300'
)
dgiotlog.log(
'src/utils/Request/request.js',
`拦截的url为${config.url}\n当前请求使用了部门token:为${departmentToken}\n用户登录token为${usertoken}`,
'color:black; font-size: 18px; font-weight: 300'
)
console.groupEnd()
config.headers[`${tokenName}`] = departmentToken
if (ignoreApi.some((item) => config.url.includes(item))) {
console.groupCollapsed(
Expand Down
158 changes: 72 additions & 86 deletions src/views/CloudFunction/dict/components/dgiotWord.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,94 +8,80 @@
* @DocumentLink:
-->
<template>
<div>
<el-tabs v-model="activeName">
<el-tab-pane
:label="$translateTitle('developer.dictinfo')"
name="字典管理"
<div style="margin-left: 30px; margin-right: 30px">
<el-button
class="mt-3"
icon="el-icon-plus"
size="small"
type="primary"
@click.native="addparam"
>
<!-- 新增 -->
{{ $translateTitle('product.newlyadded') }}
</el-button>
<h1></h1>
<el-form
ref="dataform"
class="demo-ruleForm"
label-width="100px"
:model="dataform"
size="mini"
status-icon
>
<el-table
border
:cell-style="{ 'text-align': 'center' }"
:data="dataform.params"
:header-cell-style="{ 'text-align': 'center' }"
style="width: 100%"
>
<el-form ref="dataform" label-width="100px" :model="dataform">
<el-button
class="mt-3"
icon="el-icon-plus"
size="small"
type="primary"
@click.native="addparam"
>
<!-- 新增 -->
{{ $translateTitle('product.newlyadded') }}
</el-button>
<el-table
:data="dataform.params"
style="width: 100%; text-align: center"
>
<el-table-column
:label="$translateTitle('equipment.serialnumber')"
prop="order"
/>
<el-table-column
:label="$translateTitle('deviceLog.identifier')"
prop="identifier"
/>
<el-table-column
:label="$translateTitle('equipment.name')"
prop="name"
/>
<el-table-column
:label="$translateTitle('rule.Type')"
prop="type"
/>
<el-table-column
:label="$translateTitle('cloudTest.datasources')"
prop="sources"
/>
<el-table-column
align="center"
:label="$translateTitle('task.Operation')"
width="160"
<el-table-column
:label="$translateTitle('equipment.serialnumber')"
prop="order"
/>
<el-table-column
:label="$translateTitle('deviceLog.identifier')"
prop="identifier"
/>
<el-table-column
:label="$translateTitle('equipment.name')"
prop="name"
/>
<el-table-column :label="$translateTitle('rule.Type')" prop="type" />
<el-table-column
:label="$translateTitle('cloudTest.datasources')"
prop="sources"
/>
<el-table-column
align="center"
:label="$translateTitle('task.Operation')"
width="160"
>
<template #default="{ row, $index }">
<el-button
plain
size="mini"
:title="$translateTitle('task.Edit')"
type="info"
@click.native="editRow($index, row)"
>
<template #default="{ row, $index }">
<el-button
plain
size="mini"
:title="$translateTitle('task.Edit')"
type="info"
@click.native="editRow($index, row)"
>
<!-- 编辑 -->
{{ $translateTitle('task.Edit') }}
</el-button>
<el-button
plain
size="mini"
:title="$translateTitle('task.Delete')"
type="danger"
@click.native="delRow($index)"
>
<!-- 删除 -->
{{ $translateTitle('task.Delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</el-tab-pane>
<el-tab-pane label="Json" name="Json">
<el-form ref="dataform" label-width="100px" :model="dataform">
<el-form-item :label="$translateTitle('task.data')" prop="data">
<div style="height: 30vh; overflow: auto">
<dgiot-monaco-plus
ref="monacoCode"
:codes="dataform.data"
:lang="'json'"
:read-only="false"
:theme="'vs-dark'"
/>
</div>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
<!-- 编辑 -->
{{ $translateTitle('task.Edit') }}
</el-button>
<el-button
plain
size="mini"
:title="$translateTitle('task.Delete')"
type="danger"
@click.native="delRow($index)"
>
<!-- 删除 -->
{{ $translateTitle('task.Delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
<el-drawer
ref="param"
v-drawerDrag
Expand Down
44 changes: 25 additions & 19 deletions src/views/CloudFunction/dict/components/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,31 @@
-->
<template>
<div class="index-container">
<el-drawer
ref="dgiotDict"
v-drawerDrag
append-to-body
size="50%"
title="字典"
:visible.sync="dictFlag"
>
<dgiot-dict :object-id="dictId" />
</el-drawer>
<el-drawer
ref="dgiotWord"
v-drawerDrag
append-to-body
size="50%"
:visible.sync="wordFlag"
>
<dgiot-word :data="data" :object-id="dictId" />
</el-drawer>
<div class="drawerCode-content">
<el-drawer
ref="dgiotDict"
v-drawerDrag
append-to-body
size="50%"
title="字典"
:visible.sync="dictFlag"
>
<dgiot-dict :object-id="dictId" />
</el-drawer>
</div>
<div class="drawerCode-content">
<el-drawer
ref="dgiotWord"
v-drawerDrag
append-to-body
size="50%"
title="文档字典"
top="5vh"
:visible.sync="wordFlag"
>
<dgiot-word :data="data" :object-id="dictId" />
</el-drawer>
</div>
</div>
</template>

Expand Down
7 changes: 7 additions & 0 deletions src/views/CloudFunction/dict/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<el-select
v-model="queryForm.title"
allow-create
clearable
default-first-option
filterable
placeholder="请选择"
Expand All @@ -39,6 +40,7 @@
<el-select
v-model="queryForm.type"
allow-create
clearable
default-first-option
filterable
:placeholder="$translateTitle('rule.Type')"
Expand Down Expand Up @@ -286,6 +288,11 @@
async fetchData(params) {
if (_.isEmpty(params)) params = this.queryPayload
this.queryPayload.where = {}
if (this.$route.query.id) {
this.queryForm.class = 'Product'
this.queryForm.key = this.$route.query.id
this.queryPayload.where.key = this.$route.query.id
}
this.queryForm.class
? (this.queryPayload.where.class = { $regex: this.queryForm.class })
: ''
Expand Down
10 changes: 7 additions & 3 deletions src/views/CloudSystem/manage/filemanagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,16 @@
})
},
get_fileinfo(row) {
console.log(row)
this.detailView = true
this.ViewLoading = true
file_info('files/' + row.path + '/' + row.name).then((res) => {
this.detailinfo = res.data
this.detailinfo.url =
this.$FileServe + '/' + row.path + '/' + row.name
this.detailinfo = {}
if (res.data) {
this.detailinfo = res.data
this.detailinfo.url =
this.$FileServe + '/' + row.path + '/' + row.name
}
this.ViewLoading = false
})
},
Expand Down
Loading

1 comment on commit 3f4df6a

@vercel
Copy link

@vercel vercel bot commented on 3f4df6a Jul 20, 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.vercel.app
dgiot-dashboard-git-master-dgiot.vercel.app
dgiot-dashboard-dgiot.vercel.app

Please sign in to comment.