@@ -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 )
0 commit comments