Skip to content

Commit 76928b4

Browse files
committed
feat(cloudTest): 检测项
1 parent 2650e1e commit 76928b4

File tree

8 files changed

+153
-66
lines changed

8 files changed

+153
-66
lines changed

CHANGELOG.ZH.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-07-29)
2+
3+
4+
### Bug Fixes
5+
6+
* 物模型延时缓存 ([c8dd9d4](https://github.com/dgiot/dgiot-dashboard/commit/c8dd9d4713fb9f36129fb660ecc68c55c73df775))
7+
* **cloudTest:** evidence ([e8d0510](https://github.com/dgiot/dgiot-dashboard/commit/e8d051073aee73634a11fe3d31f0a7c4f54f67be))
8+
* **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)
9+
10+
11+
### Features
12+
13+
* dgiot_amis ([8c91153](https://github.com/dgiot/dgiot-dashboard/commit/8c91153c8ad5b6b32d91c57a36fe55fefa3da721))
14+
15+
16+
117
## [4.5.6](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.4...v4.5.6) (2022-07-20)
218

319

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## [4.5.7](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.6...v4.5.7) (2022-07-29)
2+
3+
4+
### Bug Fixes
5+
6+
* 物模型延时缓存 ([c8dd9d4](https://github.com/dgiot/dgiot-dashboard/commit/c8dd9d4713fb9f36129fb660ecc68c55c73df775))
7+
* **cloudTest:** evidence ([e8d0510](https://github.com/dgiot/dgiot-dashboard/commit/e8d051073aee73634a11fe3d31f0a7c4f54f67be))
8+
* **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)
9+
10+
11+
### Features
12+
13+
* dgiot_amis ([8c91153](https://github.com/dgiot/dgiot-dashboard/commit/8c91153c8ad5b6b32d91c57a36fe55fefa3da721))
14+
15+
16+
117
## [4.5.6](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.4...v4.5.6) (2022-07-20)
218

319

src/config/secret.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
// 百度相关
1111
baidu: {
1212
// 百度地图 Ak https://lbsyun.baidu.com/apiconsole/key#/home
13-
map: 'S7pehghn5BdQeSGZAcpEk4bLQSQ8czvi',
13+
map: 'WpeAb6pL4tsX2ZVd56GHbO9Ut6c4HZhG',
1414
// 百度统计 https://tongji.baidu.com/web/homepage/index
1515
statistics: '',
1616
},

src/i18n/zh.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ export default {
520520
notested: '未测试',
521521
Inspectiontestnumber: '检验/试验编号',
522522
Newtasks: '新增任务',
523-
Underreview: '审核',
523+
Underreview: '证据审核',
524524
finishreview: '审核完成',
525525
platformlist: '台体列表',
526526
testplatform: '测试台体',
@@ -994,6 +994,7 @@ export default {
994994
datastorage: '数据存储',
995995
data: '数据',
996996
Configuration: '配置任务',
997+
testItemsreview: '检测项审核',
997998
Advancedconfiguration: '高级配置',
998999
Delete: '删除',
9991000
Taskname: '任务名称',

src/views/CloudTest/js/review.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ export default {
1818
},
1919
data() {
2020
return {
21+
management: {
22+
dialog: false,
23+
data: {},
24+
},
25+
managementactiveName: '0',
2126
statisticsVisible: false,
2227
evidenceId: '',
2328
aliplayer: {
@@ -556,19 +561,29 @@ export default {
556561
)
557562
}
558563
},
564+
handleCloseAmis() {
565+
this.coordinate = {
566+
lng: 116.404,
567+
lat: 39.915,
568+
}
569+
this.dialog_device = false
570+
this.management.dialog = false
571+
},
559572
async handleManagement(row) {
560573
this.$refs['lowcodeDesign'].withHeader = true
561574
localStorage.setItem('parse_objectid', row.objectId)
562575
const params = {
563-
limit: 1,
564576
where: { type: 'amis_view', key: row.objectId },
565577
}
566578
const { results = [] } = await queryView(params)
567579
console.log(results)
568-
if (results.length == 0)
569-
this.$baseMessage('暂无配置', 'success', 'dgiot-hey-message-success')
570-
this.lowcodeId = results[0].objectId
571-
this.$dgiotBus.$emit('lowcodePreview', results[0])
580+
if (_.isEmpty(results)) {
581+
this.$baseMessage('暂未配置检测项', 'info', 'dgiot-hey-message-error')
582+
return false
583+
} else {
584+
this.management.dialog = true
585+
this.management.data = results
586+
}
572587
},
573588
/**
574589
* @Author: h7ml

src/views/CloudTest/js/task.js

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ export default {
112112
stripe: true,
113113
lineHeight: 'medium',
114114
checkList: [
115-
'mission name',
116-
'Inspection number',
117115
'Inspection template',
118116
'testbed',
119117
'Trade Names',
@@ -122,37 +120,6 @@ export default {
122120
'end time',
123121
],
124122
columns: [
125-
{
126-
label: 'mission name',
127-
width: 'auto',
128-
prop: 'name',
129-
sortable: true,
130-
},
131-
// {
132-
// label: 'Inspection number',
133-
// width: 'auto',
134-
// prop: 'devaddr',
135-
// sortable: true,
136-
// disableCheck: true,
137-
// },
138-
{
139-
label: 'Inspection template',
140-
width: 'auto',
141-
prop: 'profile.wordtemplatename',
142-
sortable: true,
143-
},
144-
{
145-
label: 'testbed',
146-
width: 'auto',
147-
prop: 'profile.testbed',
148-
sortable: true,
149-
},
150-
// {
151-
// label: 'Creation Time',
152-
// width: 'auto',
153-
// prop: 'createdAt',
154-
// sortable: true,
155-
// },
156123
{
157124
label: 'Starting time',
158125
width: 'auto',
@@ -327,6 +294,18 @@ export default {
327294
val.objectId
328295
)
329296
},
297+
async changetestbed(val, row) {
298+
let profile = row.profile
299+
profile.testbed = val.name
300+
await putDevice(row.objectId, {
301+
profile: profile,
302+
parentId: {
303+
__type: 'Pointer',
304+
className: 'Device',
305+
objectId: val.objectId,
306+
},
307+
})
308+
},
330309
async getwordtemp() {
331310
const params = {
332311
skip: 0,
@@ -571,6 +550,14 @@ export default {
571550
*/
572551
taskStart(row) {
573552
let _this = this
553+
if (!row.profile.testbed) {
554+
_this.$baseMessage(
555+
'请选择测试台体',
556+
'waring',
557+
'dgiot-hey-message-error'
558+
)
559+
return
560+
}
574561
_this.$baseConfirm(
575562
_this.$translateTitle(
576563
'Maintenance.Are you sure you want to start the current mission'
@@ -709,7 +696,6 @@ export default {
709696
localStorage.setItem('parse_objectid', row.objectId)
710697
localStorage.setItem('product_objectid', row.product.objectId)
711698
const params = {
712-
limit: 1,
713699
where: { type: 'amis', key: row.objectId },
714700
}
715701
const { results } = await queryView(params)

src/views/CloudTest/review/index.vue

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -229,20 +229,6 @@
229229
@submit.native.prevent
230230
>
231231
<el-form-item>
232-
<!-- <el-select-->
233-
<!-- v-model="queryForm.name"-->
234-
<!-- multiple-->
235-
<!-- :placeholder="-->
236-
<!-- $translateTitle('cloudTest.Please select review status')-->
237-
<!-- "-->
238-
<!-- >-->
239-
<!-- <el-option-->
240-
<!-- v-for="item in options"-->
241-
<!-- :key="item.value"-->
242-
<!-- :label="item.label"-->
243-
<!-- :value="item.value"-->
244-
<!-- />-->
245-
<!-- </el-select>-->
246232
<el-input
247233
v-model="queryForm.name"
248234
:placeholder="
@@ -346,6 +332,14 @@
346332
>
347333
{{ $translateTitle(`product.Underreview`) }}
348334
</el-button>
335+
<el-button
336+
v-show="row.profile.iszjimee"
337+
size="mini"
338+
type="primary"
339+
@click.native="handleManagement(row)"
340+
>
341+
{{ $translateTitle(`task.testItemsreview`) }}
342+
</el-button>
349343
<el-button
350344
v-show="row.profile.step == 3"
351345
size="mini"
@@ -386,14 +380,6 @@
386380
>
387381
历史数据
388382
</el-button>
389-
<el-button
390-
v-show="row.profile.step != -1"
391-
size="mini"
392-
type="success"
393-
@click.native="handleManagement(row)"
394-
>
395-
{{ $translateTitle(`task.Configuration`) }}
396-
</el-button>
397383
</template>
398384
</el-table-column>
399385
<template #empty>
@@ -414,6 +400,26 @@
414400
@paginationQuery="paginationQuery"
415401
/>
416402
<lowcode-design ref="lowcodeDesign" @objectId="lowcodeId" />
403+
<!--检测项审核-->
404+
<el-dialog
405+
append-to-body
406+
:before-close="handleCloseAmis"
407+
center
408+
top="5vh"
409+
:visible.sync="management.dialog"
410+
width="80%"
411+
>
412+
<el-tabs v-model="managementactiveName">
413+
<el-tab-pane
414+
v-for="(item, index) in management.data"
415+
:key="index + 'i'"
416+
:label="item.title"
417+
:name="index + ''"
418+
>
419+
<dgiot-amis :schema="item.data" :show-help="false" />
420+
</el-tab-pane>
421+
</el-tabs>
422+
</el-dialog>
417423
</div>
418424
</template>
419425

src/views/CloudTest/task/index.vue

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,60 @@
373373
<el-table-column
374374
align="center"
375375
:label="$translateTitle('cloudTest.number')"
376-
show-overflow-tooltip
377-
width="auto"
376+
width="50px"
378377
>
379378
<template #default="{ $index }">
380379
{{ $index + 1 }}
381380
</template>
382381
</el-table-column>
382+
<el-table-column
383+
align="center"
384+
label="任务名称"
385+
prop="name"
386+
show-overflow-tooltip
387+
sortable
388+
width="160"
389+
/>
390+
<el-table-column
391+
align="center"
392+
label="报告模板"
393+
prop="profile.wordtemplatename"
394+
show-overflow-tooltip
395+
sortable
396+
width="160"
397+
/>
398+
<el-table-column
399+
align="center"
400+
label="测试台体"
401+
prop="name"
402+
show-overflow-tooltip
403+
sortable
404+
width="160"
405+
>
406+
<template #default="{ row }">
407+
<span v-if="row.profile.testbed">{{ row.profile.testbed }}</span>
408+
<el-form v-else :model="row">
409+
<el-select
410+
v-model="row.profile.testbed"
411+
:placeholder="$translateTitle('task.Select')"
412+
style="width: 100%"
413+
value-key="objectId"
414+
@change="
415+
(val) => {
416+
changetestbed(val, row)
417+
}
418+
"
419+
>
420+
<el-option
421+
v-for="item in grouplist"
422+
:key="item.objectId"
423+
:label="item.name"
424+
:value="item"
425+
/>
426+
</el-select>
427+
</el-form>
428+
</template>
429+
</el-table-column>
383430
<el-table-column
384431
v-for="(item, index) in finallyColumns"
385432
:key="index"
@@ -390,7 +437,6 @@
390437
:sortable="item.sortable"
391438
:width="item.width"
392439
/>
393-
394440
<el-table-column
395441
align="center"
396442
:label="$translateTitle(`deviceLog.status`)"
@@ -537,6 +583,7 @@
537583
.el-divider__text {
538584
font-size: 18px;
539585
}
586+
540587
.setting {
541588
margin: 20px 0;
542589
}

0 commit comments

Comments
 (0)