|
|
|
@ -35,6 +35,7 @@ |
|
|
|
:height="height" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
:row-style="rowToolStyle" |
|
|
|
ref="mainTable" |
|
|
|
@row-click="changeData" |
|
|
|
highlight-current-row |
|
|
|
@ -72,7 +73,6 @@ |
|
|
|
</el-table> |
|
|
|
<el-pagination |
|
|
|
@size-change="sizeChangeHandle" |
|
|
|
@row-click="changeInstanceData" |
|
|
|
:current-page="pageIndex" |
|
|
|
:page-sizes="[20, 50, 100, 1000]" |
|
|
|
:page-size="pageSize" |
|
|
|
@ -88,6 +88,9 @@ |
|
|
|
:data="detailList" |
|
|
|
height="240" |
|
|
|
border |
|
|
|
@row-click="changeInstanceData" |
|
|
|
highlight-current-row |
|
|
|
:row-style="rowToolInstanceStyle" |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%; "> |
|
|
|
<el-table-column |
|
|
|
@ -126,11 +129,11 @@ |
|
|
|
<!-- 选择组件 --> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
<!-- 工具信息 --> |
|
|
|
<toolInfoAddUpdate ref="toolInfoAddUpdate" :close-on-click-modal="false" @refreshTooInfoData="refreshTooInfoData"> |
|
|
|
<toolInfoAddUpdate ref="toolInfoAddUpdate" :close-on-click-modal="false" @refreshTooInfoData="refreshTooInfoData" @changeCurrentToolInfo="changeCurrentToolInfo"> |
|
|
|
</toolInfoAddUpdate> |
|
|
|
|
|
|
|
<!-- 工具实例信息 --> |
|
|
|
<toolInstanceAddUpdate ref="toolInstanceAddUpdate" :close-on-click-modal="false" @refreshTooInstanceData="refreshTooInstanceData"> |
|
|
|
<toolInstanceAddUpdate ref="toolInstanceAddUpdate" :close-on-click-modal="false" @refreshTooInstanceData="refreshTooInstanceData" @changeCurrentToolInstance="changeCurrentToolInstance"> |
|
|
|
</toolInstanceAddUpdate> |
|
|
|
|
|
|
|
<!-- 工具实例生命周期信息 --> |
|
|
|
@ -167,7 +170,6 @@ export default { |
|
|
|
toolInstanceDateShow,/*工具实例新增日期和修改组件*/ |
|
|
|
toolPropertyShow,/*工具属性修改组件*/ |
|
|
|
}, |
|
|
|
name: "null", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
fileContentList: [], |
|
|
|
@ -843,7 +845,7 @@ export default { |
|
|
|
|
|
|
|
/*切换工具实例*/ |
|
|
|
changeInstanceData(row){ |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
|
|
|
this.currentInstanceRow = JSON.parse(JSON.stringify(row)); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
@ -857,7 +859,12 @@ export default { |
|
|
|
this.totalPage = data.total; |
|
|
|
if(this.dataList.length > 0){ |
|
|
|
this.$refs.mainTable.setCurrentRow(this.dataList[0]); |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList[0])); |
|
|
|
//如果已经存在则 不修改默认数值 不然修改默认选择行为第一行 |
|
|
|
if(this.currentRow && Object.keys(this.currentRow).length > 0){ |
|
|
|
//已经存在 不需要修改 |
|
|
|
}else{ |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList[0])); |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.currentRow ={} |
|
|
|
} |
|
|
|
@ -926,6 +933,32 @@ export default { |
|
|
|
this.search() |
|
|
|
}, |
|
|
|
|
|
|
|
/*调整等待派工单的等待时间*/ |
|
|
|
changeCurrentToolInfo(tempData) { |
|
|
|
//重置选择行 |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(tempData)); |
|
|
|
}, |
|
|
|
|
|
|
|
/*调整等待派工单的等待时间*/ |
|
|
|
changeCurrentToolInstance(tempData) { |
|
|
|
//重置选择行 |
|
|
|
this.currentInstanceRow = JSON.parse(JSON.stringify(tempData)); |
|
|
|
}, |
|
|
|
|
|
|
|
/*选中行的样式*/ |
|
|
|
rowToolStyle ({row}) { |
|
|
|
if (this.currentRow.site === row.site && this.currentRow.toolId === row.toolId) { |
|
|
|
return { 'background-color': '#D9EDF7', cursor: 'pointer' }; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*选中行的样式*/ |
|
|
|
rowToolInstanceStyle ({row}) { |
|
|
|
if (this.currentInstanceRow.site === row.site && this.currentInstanceRow.toolInstance === row.toolInstance) { |
|
|
|
return { 'background-color': '#D9EDF7', cursor: 'pointer' }; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
activated() { |
|
|
|
|
|
|
|
|