Skip to content

Commit

Permalink
feat(device): rewrite device management interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dgiot-fe committed Apr 28, 2022
1 parent 0fdb3c8 commit 85ad1b0
Show file tree
Hide file tree
Showing 20 changed files with 829 additions and 141 deletions.
2 changes: 1 addition & 1 deletion src/components/Device/info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{ $translateTitle('equipment.installationlocation') + ':' }}
</td>
<td>
{{ devicedetail.detail ? devicedetail.detail.address : '' }}
{{ devicedetail.address ? devicedetail.address : '' }}
</td>
<td class="cloumn">
{{ $translateTitle('equipment.state') + ':' }}
Expand Down
2 changes: 1 addition & 1 deletion src/config/local.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ let systemStatic = {
'lint.css',
'vditor.css',
'xterm.css',
'aliplayer-min.css',
'amis/lib/themes/cxd.css',
'amis/lib/helper.css',
'amis/lib/themes/antd.css',
],
js: [
'aliplayer-min.css',
'vue.js',
'mqttws31.js',
'vue-router.min.js',
Expand Down
9 changes: 7 additions & 2 deletions src/dgiot/components/DgiotAliplayer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
* @document https://github.com/langyuxiansheng/vue-aliplayer-v2#31-%E9%85%8D%E7%BD%AE%E9%A1%B9-options-%E5%B1%9E%E6%80%A7
*/
const VueAliplayerV2 = window['vue-aliplayer-v2'].default
Vue.use(VueAliplayerV2, {
cssLink:
'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css',
// scriptSrc: 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js',
})
// dgiotlog.log('VueAliplayerV2', VueAliplayerV2)
// import VueAliplayerV2 from 'vue-aliplayer-v2'
export default {
Expand All @@ -73,9 +78,9 @@
* @param {*} source 视频地址
*/
playsource: {
required: true,
required: false,
type: String,
default: '',
default: 'http://resource.wangdaodao.com/402670506.mp4',
},
/**
* @param {*} autoplay 是否自动播放
Expand Down
2 changes: 1 addition & 1 deletion src/dgiot/components/DgiotDialog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
title: {
type: String,
default: '提示',
default: '',
},
appendToBody: {
// Dialog 自身是否插入至 body 元素上。嵌套的 Dialog 必须指定该属性并赋值为 true
Expand Down
4 changes: 4 additions & 0 deletions src/dgiot/plugins/vue-audio-visual.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
import AudioVisual from 'vue-audio-visual'
import BaiduMap from 'vue-baidu-map'
Vue.use(AudioVisual)
Vue.use(BaiduMap, {
ak: 'WpeAb6pL4tsX2ZVd56GHbO9Ut6c4HZhG',
})
7 changes: 3 additions & 4 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ function getMessage(tag) {
window.dashboard = info
window.dgiot = info
console.log(
`%c dashboard %c version v${dashboard.version} %c`,
'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff',
'background:#41b883 ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff',
'background:transparent'
' %c Design with by Dgiot %c http://dev.iotn2n.com ' + '\n\n\n',
'color: #fadfa3; background: #030307; padding:5px 0;',
'background: #fadfa3; padding:5px 0;'
)
2 changes: 1 addition & 1 deletion src/utils/utilwen.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ export default {
Vue.prototype.$aclObj = aclObj
Vue.prototype.$deepClone = deepClone
Vue.prototype.$ajax = ajax
Vue.prototype.$loadsh = _
Vue.prototype.$lodash = _
Vue.prototype.$convertRes2Blob = convertRes2Blob
Vue.prototype.$bus = Bus
Vue.prototype.$o2Log = o2Log
Expand Down
6 changes: 3 additions & 3 deletions src/views/CloudFunction/topo/components/TopoOperation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<el-form-item :label="$translateTitle(`konva.${key}`)">
<!-- 判断不同的数据类型,显示不同的控件-->
<el-input
v-if="$loadsh.isString(Shapeconfig.attrs[key])"
v-if="$lodash.isString(Shapeconfig.attrs[key])"
v-model="Shapeconfig.attrs[key]"
:disabled="disableKey.includes(key)"
>
Expand All @@ -48,12 +48,12 @@
</el-input>

<el-input-number
v-if="$loadsh.isNumber(Shapeconfig.attrs[key])"
v-if="$lodash.isNumber(Shapeconfig.attrs[key])"
v-model="Shapeconfig.attrs[key]"
style="width: 100%"
/>
<el-switch
v-if="$loadsh.isBoolean(Shapeconfig.attrs[key])"
v-if="$lodash.isBoolean(Shapeconfig.attrs[key])"
v-model="Shapeconfig.attrs[key]"
:active-text="$translateTitle(`konva.draggable`)"
:inactive-text="$translateTitle(`konva.undraggable`)"
Expand Down
2 changes: 1 addition & 1 deletion src/views/CloudOc/MetaData/components/module.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
>
<template #default="{ row }">
<el-switch
v-if="$loadsh.isBoolean(row[item.prop])"
v-if="$lodash.isBoolean(row[item.prop])"
v-model="row[item.prop]"
/>
<el-select
Expand Down
31 changes: 16 additions & 15 deletions src/views/CloudSystem/logs/history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
v-model="queryForm.searchDate"
class="item-time-picker"
:end-placeholder="$translateTitle('Maintenance.end time')"
format="yyyy-MM-dd"
format="yyyy-MM-DD HH:mm:ss.SSSSSS"
:start-placeholder="$translateTitle('Maintenance.start time')"
type="daterange"
value-format="yyyy-MM-dd"
type="datetimerange"
value-format="yyyy-MM-DD HH:mm:ss.SSSSSS"
/>
</el-form-item>
<el-form-item label="level">
Expand Down Expand Up @@ -221,8 +221,8 @@
topic: '',
domain: '',
searchDate: [
moment().subtract('days', 7).format('YYYY-MM-DD'),
moment(new Date()).format('YYYY-MM-DD'),
moment().subtract('days', 7).format('yyyy-MM-DD HH:mm:ss.SSSSSS'),
moment(new Date()).format('yyyy-MM-DD HH:mm:ss.SSSSSS'),
],
order: '-createdAt',
keys: 'count(*)',
Expand Down Expand Up @@ -355,18 +355,19 @@
$options: 'i',
}
: { $ne: '3333' },
createdAt: {
$gte: {
__type: 'Date',
iso: `${this.queryForm.searchDate[0]}T00:00:00.000Z`,
},
$lte: {
__type: 'Date',
iso: `${this.queryForm.searchDate[1]}T23:59:59.000Z`,
},
},
// time: {
// $get: moment(this.queryForm.searchDate[0]).format('SSS'),
// $lte: moment(this.queryForm.searchDate[1]).format('SSS'),
// },
},
}
console.log(this.queryForm.searchDate)
console.log({
time: {
$get: moment(this.queryForm.searchDate[0]).format('x'),
// $lte: moment(this.queryForm.searchDate[1]).format('x'),
},
})
const { results = [], count: total = 0 } = await queryLog(params)
results.forEach((item) => {
item.time = this.$moment(
Expand Down
4 changes: 2 additions & 2 deletions src/views/CloudTest/task/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -452,15 +452,15 @@
>
<template #default="{ row }">
<el-button
v-show="row.profile.step == 0 && $loadsh.isEmpty(row.basedata)"
v-show="row.profile.step == 0 && $lodash.isEmpty(row.basedata)"
size="mini"
type="success"
@click.native="handleManagement(row)"
>
{{ $translateTitle(`task.Configuration`) }}
</el-button>
<el-button
v-show="row.profile.step == 0 && !$loadsh.isEmpty(row.basedata)"
v-show="row.profile.step == 0 && !$lodash.isEmpty(row.basedata)"
size="mini"
type="info"
@click.native="taskStart(row)"
Expand Down
2 changes: 1 addition & 1 deletion src/views/DeviceCloud/manage/component/SceneLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dgiot-query-form>
<dgiot-query-form-top-panel>
<el-form
v-if="!$loadsh.isEmpty(queryForm)"
v-if="!$lodash.isEmpty(queryForm)"
ref="form"
:inline="true"
label-width="80px"
Expand Down
2 changes: 1 addition & 1 deletion src/views/DeviceCloud/manage/devicelist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
class="map_dialog"
title="设备位置"
:visible.sync="dialog_device"
width="60%"
width="50%"
>
<el-card>
<dgiot-baidu-map
Expand Down

0 comments on commit 85ad1b0

Please sign in to comment.