Skip to content

Commit

Permalink
feat(cloudTest): 检测项
Browse files Browse the repository at this point in the history
  • Loading branch information
dawnwinterLiu committed Aug 4, 2022
1 parent 2650e1e commit 76928b4
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 66 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.ZH.md
@@ -1,3 +1,19 @@
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-07-29)


### Bug Fixes

* 物模型延时缓存 ([c8dd9d4](https://github.com/dgiot/dgiot-dashboard/commit/c8dd9d4713fb9f36129fb660ecc68c55c73df775))
* **cloudTest:** evidence ([e8d0510](https://github.com/dgiot/dgiot-dashboard/commit/e8d051073aee73634a11fe3d31f0a7c4f54f67be))
* **dashboard): build(发布版本:** dgiot-dashboard@v4.5.6 ([1d4302c](https://github.com/dgiot/dgiot-dashboard/commit/1d4302cd183474db6bbbb6dbc4fbc46163d351c8)), closes [#511](https://github.com/dgiot/dgiot-dashboard/issues/511)


### Features

* dgiot_amis ([8c91153](https://github.com/dgiot/dgiot-dashboard/commit/8c91153c8ad5b6b32d91c57a36fe55fefa3da721))



## [4.5.6](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.4...v4.5.6) (2022-07-20)


Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,19 @@
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-07-29)


### Bug Fixes

* 物模型延时缓存 ([c8dd9d4](https://github.com/dgiot/dgiot-dashboard/commit/c8dd9d4713fb9f36129fb660ecc68c55c73df775))
* **cloudTest:** evidence ([e8d0510](https://github.com/dgiot/dgiot-dashboard/commit/e8d051073aee73634a11fe3d31f0a7c4f54f67be))
* **dashboard): build(发布版本:** dgiot-dashboard@v4.5.6 ([1d4302c](https://github.com/dgiot/dgiot-dashboard/commit/1d4302cd183474db6bbbb6dbc4fbc46163d351c8)), closes [#511](https://github.com/dgiot/dgiot-dashboard/issues/511)


### Features

* dgiot_amis ([8c91153](https://github.com/dgiot/dgiot-dashboard/commit/8c91153c8ad5b6b32d91c57a36fe55fefa3da721))



## [4.5.6](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.4...v4.5.6) (2022-07-20)


Expand Down
2 changes: 1 addition & 1 deletion src/config/secret.config.js
Expand Up @@ -10,7 +10,7 @@ module.exports = {
// 百度相关
baidu: {
// 百度地图 Ak https://lbsyun.baidu.com/apiconsole/key#/home
map: 'S7pehghn5BdQeSGZAcpEk4bLQSQ8czvi',
map: 'WpeAb6pL4tsX2ZVd56GHbO9Ut6c4HZhG',
// 百度统计 https://tongji.baidu.com/web/homepage/index
statistics: '',
},
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/zh.js
Expand Up @@ -520,7 +520,7 @@ export default {
notested: '未测试',
Inspectiontestnumber: '检验/试验编号',
Newtasks: '新增任务',
Underreview: '审核',
Underreview: '证据审核',
finishreview: '审核完成',
platformlist: '台体列表',
testplatform: '测试台体',
Expand Down Expand Up @@ -994,6 +994,7 @@ export default {
datastorage: '数据存储',
data: '数据',
Configuration: '配置任务',
testItemsreview: '检测项审核',
Advancedconfiguration: '高级配置',
Delete: '删除',
Taskname: '任务名称',
Expand Down
25 changes: 20 additions & 5 deletions src/views/CloudTest/js/review.js
Expand Up @@ -18,6 +18,11 @@ export default {
},
data() {
return {
management: {
dialog: false,
data: {},
},
managementactiveName: '0',
statisticsVisible: false,
evidenceId: '',
aliplayer: {
Expand Down Expand Up @@ -556,19 +561,29 @@ export default {
)
}
},
handleCloseAmis() {
this.coordinate = {
lng: 116.404,
lat: 39.915,
}
this.dialog_device = false
this.management.dialog = false
},
async handleManagement(row) {
this.$refs['lowcodeDesign'].withHeader = true
localStorage.setItem('parse_objectid', row.objectId)
const params = {
limit: 1,
where: { type: 'amis_view', key: row.objectId },
}
const { results = [] } = await queryView(params)
console.log(results)
if (results.length == 0)
this.$baseMessage('暂无配置', 'success', 'dgiot-hey-message-success')
this.lowcodeId = results[0].objectId
this.$dgiotBus.$emit('lowcodePreview', results[0])
if (_.isEmpty(results)) {
this.$baseMessage('暂未配置检测项', 'info', 'dgiot-hey-message-error')
return false
} else {
this.management.dialog = true
this.management.data = results
}
},
/**
* @Author: h7ml
Expand Down
54 changes: 20 additions & 34 deletions src/views/CloudTest/js/task.js
Expand Up @@ -112,8 +112,6 @@ export default {
stripe: true,
lineHeight: 'medium',
checkList: [
'mission name',
'Inspection number',
'Inspection template',
'testbed',
'Trade Names',
Expand All @@ -122,37 +120,6 @@ export default {
'end time',
],
columns: [
{
label: 'mission name',
width: 'auto',
prop: 'name',
sortable: true,
},
// {
// label: 'Inspection number',
// width: 'auto',
// prop: 'devaddr',
// sortable: true,
// disableCheck: true,
// },
{
label: 'Inspection template',
width: 'auto',
prop: 'profile.wordtemplatename',
sortable: true,
},
{
label: 'testbed',
width: 'auto',
prop: 'profile.testbed',
sortable: true,
},
// {
// label: 'Creation Time',
// width: 'auto',
// prop: 'createdAt',
// sortable: true,
// },
{
label: 'Starting time',
width: 'auto',
Expand Down Expand Up @@ -327,6 +294,18 @@ export default {
val.objectId
)
},
async changetestbed(val, row) {
let profile = row.profile
profile.testbed = val.name
await putDevice(row.objectId, {
profile: profile,
parentId: {
__type: 'Pointer',
className: 'Device',
objectId: val.objectId,
},
})
},
async getwordtemp() {
const params = {
skip: 0,
Expand Down Expand Up @@ -571,6 +550,14 @@ export default {
*/
taskStart(row) {
let _this = this
if (!row.profile.testbed) {
_this.$baseMessage(
'请选择测试台体',
'waring',
'dgiot-hey-message-error'
)
return
}
_this.$baseConfirm(
_this.$translateTitle(
'Maintenance.Are you sure you want to start the current mission'
Expand Down Expand Up @@ -709,7 +696,6 @@ export default {
localStorage.setItem('parse_objectid', row.objectId)
localStorage.setItem('product_objectid', row.product.objectId)
const params = {
limit: 1,
where: { type: 'amis', key: row.objectId },
}
const { results } = await queryView(params)
Expand Down
50 changes: 28 additions & 22 deletions src/views/CloudTest/review/index.vue
Expand Up @@ -229,20 +229,6 @@
@submit.native.prevent
>
<el-form-item>
<!-- <el-select-->
<!-- v-model="queryForm.name"-->
<!-- multiple-->
<!-- :placeholder="-->
<!-- $translateTitle('cloudTest.Please select review status')-->
<!-- "-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"-->
<!-- />-->
<!-- </el-select>-->
<el-input
v-model="queryForm.name"
:placeholder="
Expand Down Expand Up @@ -346,6 +332,14 @@
>
{{ $translateTitle(`product.Underreview`) }}
</el-button>
<el-button
v-show="row.profile.iszjimee"
size="mini"
type="primary"
@click.native="handleManagement(row)"
>
{{ $translateTitle(`task.testItemsreview`) }}
</el-button>
<el-button
v-show="row.profile.step == 3"
size="mini"
Expand Down Expand Up @@ -386,14 +380,6 @@
>
历史数据
</el-button>
<el-button
v-show="row.profile.step != -1"
size="mini"
type="success"
@click.native="handleManagement(row)"
>
{{ $translateTitle(`task.Configuration`) }}
</el-button>
</template>
</el-table-column>
<template #empty>
Expand All @@ -414,6 +400,26 @@
@paginationQuery="paginationQuery"
/>
<lowcode-design ref="lowcodeDesign" @objectId="lowcodeId" />
<!--检测项审核-->
<el-dialog
append-to-body
:before-close="handleCloseAmis"
center
top="5vh"
:visible.sync="management.dialog"
width="80%"
>
<el-tabs v-model="managementactiveName">
<el-tab-pane
v-for="(item, index) in management.data"
:key="index + 'i'"
:label="item.title"
:name="index + ''"
>
<dgiot-amis :schema="item.data" :show-help="false" />
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</template>

Expand Down
53 changes: 50 additions & 3 deletions src/views/CloudTest/task/index.vue
Expand Up @@ -373,13 +373,60 @@
<el-table-column
align="center"
:label="$translateTitle('cloudTest.number')"
show-overflow-tooltip
width="auto"
width="50px"
>
<template #default="{ $index }">
{{ $index + 1 }}
</template>
</el-table-column>
<el-table-column
align="center"
label="任务名称"
prop="name"
show-overflow-tooltip
sortable
width="160"
/>
<el-table-column
align="center"
label="报告模板"
prop="profile.wordtemplatename"
show-overflow-tooltip
sortable
width="160"
/>
<el-table-column
align="center"
label="测试台体"
prop="name"
show-overflow-tooltip
sortable
width="160"
>
<template #default="{ row }">
<span v-if="row.profile.testbed">{{ row.profile.testbed }}</span>
<el-form v-else :model="row">
<el-select
v-model="row.profile.testbed"
:placeholder="$translateTitle('task.Select')"
style="width: 100%"
value-key="objectId"
@change="
(val) => {
changetestbed(val, row)
}
"
>
<el-option
v-for="item in grouplist"
:key="item.objectId"
:label="item.name"
:value="item"
/>
</el-select>
</el-form>
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in finallyColumns"
:key="index"
Expand All @@ -390,7 +437,6 @@
:sortable="item.sortable"
:width="item.width"
/>

<el-table-column
align="center"
:label="$translateTitle(`deviceLog.status`)"
Expand Down Expand Up @@ -537,6 +583,7 @@
.el-divider__text {
font-size: 18px;
}
.setting {
margin: 20px 0;
}
Expand Down

1 comment on commit 76928b4

@vercel
Copy link

@vercel vercel bot commented on 76928b4 Aug 4, 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.