9292 :width =" col.width"
9393 :sortable =" col.sortable"
9494 >
95- <template v-if = " col . value_type === ' 6 ' || col . is_password " #default =" {row } " >
95+ <template #default =" {row } " >
9696 <PasswordField
9797 v-if =" col .is_password "
9898 :password =" row [col .field ]"
9999 />
100- <span
101- v-else-if =" col.value_type === '6' && row[col.field]"
102- >
103- {{ row[col.field] }}
100+ <span >
101+ {{ typeof row[col.field] === 'object' ? JSON.stringify(row[col.field]) : row[col.field] }}
104102 </span >
105103 </template >
106104 </vxe-column >
137135 ></vxe-column >
138136 <vxe-column
139137 :title =" $t('operation')"
140- v-bind =" columns.length ? { width: '60px ' } : { minWidth: '60px ' }"
138+ v-bind =" columns.length ? { width: '100px ' } : { minWidth: '100px ' }"
141139 align =" center"
142140 fixed =" right"
143141 >
146144 <a-tooltip :title =" $t('cmdb.ad.accept')" >
147145 <a v-if =" !row.is_accept" @click =" accept(row)" ><ops-icon type =" cmdb-manual_warehousing" /></a >
148146 </a-tooltip >
147+ <a-tooltip :title =" $t('cmdb.ad.viewRawData')" >
148+ <a @click =" viewADC(row)" ><a-icon type =" eye" /></a >
149+ </a-tooltip >
149150 <a :style =" { color: 'red' }" @click =" deleteADC(row)" ><a-icon type =" delete" /></a >
150151 </a-space >
151152 </template >
175176 </p >
176177 </a-modal >
177178 </div >
179+
180+ <RawDataModal ref="rawDataModalRef" />
178181 </template >
179182 </TwoColumnLayout >
180183</template >
@@ -185,14 +188,16 @@ import XEUtils from 'xe-utils'
185188import TwoColumnLayout from ' @/components/TwoColumnLayout'
186189import AdcCounter from ' ./components/adcCounter.vue'
187190import PasswordField from ' ./components/passwordField.vue'
191+ import RawDataModal from ' ./components/rawDataModal.vue'
188192
189193import {
190194 getADCCiTypes ,
191195 getAdc ,
192196 updateADCAccept ,
193197 getADCCiTypesAttrs ,
194198 deleteAdc ,
195- getAdcExecHistories
199+ getAdcExecHistories ,
200+ getAdcById
196201} from ' ../../api/discovery'
197202import { getCITableColumns } from ' ../../utils/helper'
198203
@@ -201,7 +206,8 @@ export default {
201206 components: {
202207 TwoColumnLayout,
203208 AdcCounter,
204- PasswordField
209+ PasswordField,
210+ RawDataModal
205211 },
206212 data () {
207213 return {
@@ -352,6 +358,12 @@ export default {
352358 onCancel () {},
353359 })
354360 },
361+
362+ async viewADC (row ) {
363+ const res = await getAdcById (row .id )
364+ this .$refs .rawDataModalRef .open (res || {})
365+ },
366+
355367 async batchAccept () {
356368 for (let i = 0 ; i < this .selectedRowKeys .length ; i++ ) {
357369 await updateADCAccept (this .selectedRowKeys [i])
0 commit comments