|
|
|
@ -13,7 +13,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="日历标识"> |
|
|
|
<span slot="label" style="" @click="getBaseList(1018)"><a herf="#">日历标识</a></span> |
|
|
|
<el-input v-model="searchData.calendarId" ></el-input> |
|
|
|
<el-input v-model="searchData.calendarId"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button> |
|
|
|
@ -52,9 +52,10 @@ |
|
|
|
fixed="right" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="editToolInfoModal(scope.row)">编辑 </a> |
|
|
|
<a type="text" size="small" v-if = "scope.row.propertyNo && scope.row.propertyNo !== ''" @click="editToolInfoPropertyModal(scope.row)">属性 </a> |
|
|
|
<a type="text" size="small" @click="deleteToolInfoConfirm(scope.row)">删除 </a> |
|
|
|
<a type="text" size="small" @click="editToolInfoModal(scope.row)">编辑 </a> |
|
|
|
<a type="text" size="small" v-if="scope.row.propertyNo && scope.row.propertyNo !== ''" |
|
|
|
@click="editToolInfoPropertyModal(scope.row)">属性 </a> |
|
|
|
<a type="text" size="small" @click="deleteToolInfoConfirm(scope.row)">删除 </a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -68,7 +69,7 @@ |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
@ -84,7 +85,8 @@ |
|
|
|
:total="totalPage" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
<el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick"> |
|
|
|
<el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" |
|
|
|
@tab-click="tabClick"> |
|
|
|
<el-tab-pane label="工具实例" name="detail"> |
|
|
|
<div style="padding: 5px 0 0 5px"> |
|
|
|
<el-button type="primary" @click="addToolInstanceModal()">新增</el-button> |
|
|
|
@ -121,10 +123,11 @@ |
|
|
|
fixed="right" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="editToolInstanceModal(scope.row)">编辑 </a> |
|
|
|
<a type="text" size="small" v-if = "scope.row.propertyNo && scope.row.propertyNo !== ''" @click="editToolInstancePropertyModal(scope.row)">属性 </a> |
|
|
|
<a type="text" size="small" @click="editToolInstanceDateModal(scope.row)">生命周期 </a> |
|
|
|
<a type="text" size="small" @click="deleteToolInstanceConfirm(scope.row)">删除 </a> |
|
|
|
<a type="text" size="small" @click="editToolInstanceModal(scope.row)">编辑 </a> |
|
|
|
<a type="text" size="small" v-if="scope.row.propertyNo && scope.row.propertyNo !== ''" |
|
|
|
@click="editToolInstancePropertyModal(scope.row)">属性 </a> |
|
|
|
<a type="text" size="small" @click="editToolInstanceDateModal(scope.row)">生命周期 </a> |
|
|
|
<a type="text" size="small" @click="deleteToolInstanceConfirm(scope.row)">删除 </a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -132,21 +135,25 @@ |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
<!-- 选择组件 --> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
<!-- 工具信息 --> |
|
|
|
<toolInfoAddUpdate ref="toolInfoAddUpdate" :close-on-click-modal="false" @refreshTooInfoData="refreshTooInfoData" @changeCurrentToolInfo="changeCurrentToolInfo"> |
|
|
|
<toolInfoAddUpdate ref="toolInfoAddUpdate" :close-on-click-modal="false" @refreshTooInfoData="refreshTooInfoData" |
|
|
|
@changeCurrentToolInfo="changeCurrentToolInfo" @changeCurrentToolRow="changeCurrentToolRow"> |
|
|
|
</toolInfoAddUpdate> |
|
|
|
|
|
|
|
<!-- 工具实例信息 --> |
|
|
|
<toolInstanceAddUpdate ref="toolInstanceAddUpdate" :close-on-click-modal="false" @refreshTooInstanceData="refreshTooInstanceData" @changeCurrentToolInstance="changeCurrentToolInstance"> |
|
|
|
<toolInstanceAddUpdate ref="toolInstanceAddUpdate" :close-on-click-modal="false" |
|
|
|
@refreshTooInstanceData="refreshTooInstanceData" |
|
|
|
@changeCurrentToolInstance="changeCurrentToolInstance"> |
|
|
|
</toolInstanceAddUpdate> |
|
|
|
|
|
|
|
<!-- 工具实例生命周期信息 --> |
|
|
|
<toolInstanceDateShow ref="toolInstanceDateShow" :close-on-click-modal="false" @refreshTooInstanceData="refreshTooInstanceData"> |
|
|
|
<toolInstanceDateShow ref="toolInstanceDateShow" :close-on-click-modal="false" |
|
|
|
@refreshTooInstanceData="refreshTooInstanceData"> |
|
|
|
</toolInstanceDateShow> |
|
|
|
|
|
|
|
<!-- 工具属性信息 --> |
|
|
|
<toolPropertyShow ref="toolPropertyShow" :close-on-click-modal="false" > |
|
|
|
<toolPropertyShow ref="toolPropertyShow" :close-on-click-modal="false"> |
|
|
|
</toolPropertyShow> |
|
|
|
|
|
|
|
</div> |
|
|
|
@ -179,29 +186,29 @@ export default { |
|
|
|
return { |
|
|
|
fileContentList: [], |
|
|
|
activeName: 'detail', |
|
|
|
searchData:{ |
|
|
|
searchData: { |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 100, |
|
|
|
site:this.$store.state.user.site, |
|
|
|
toolId:'', |
|
|
|
toolType:'', |
|
|
|
site: this.$store.state.user.site, |
|
|
|
toolId: '', |
|
|
|
toolType: '', |
|
|
|
calendarId: '', |
|
|
|
startDate:'', |
|
|
|
endDate:'', |
|
|
|
startDate: '', |
|
|
|
endDate: '', |
|
|
|
}, |
|
|
|
currentRow:{}, |
|
|
|
currentRow: {}, |
|
|
|
currentInstanceRow: {}, |
|
|
|
height: 200, |
|
|
|
dataList:[], |
|
|
|
detailList:[], |
|
|
|
dataList: [], |
|
|
|
detailList: [], |
|
|
|
dataListLoading: false, |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
exportName: "工具信息" + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
exportHeader: ["工具信息"], |
|
|
|
exportFooter: [], |
|
|
|
exportList:[], |
|
|
|
tagNo:'', |
|
|
|
exportList: [], |
|
|
|
tagNo: '', |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 100, |
|
|
|
totalPage: 0, |
|
|
|
@ -820,7 +827,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取基础数据列表S |
|
|
|
getBaseList (val, type) { |
|
|
|
getBaseList(val, type) { |
|
|
|
this.tagNo = val |
|
|
|
this.$nextTick(() => { |
|
|
|
let strVal = '' |
|
|
|
@ -828,10 +835,10 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
/* 列表方法的回调 */ |
|
|
|
getBaseData (val) { |
|
|
|
getBaseData(val) { |
|
|
|
if (this.tagNo === 1016) { |
|
|
|
this.searchData.toolType = val.tool_type; |
|
|
|
}else if (this.tagNo === 1018) { |
|
|
|
} else if (this.tagNo === 1018) { |
|
|
|
this.searchData.calendarId = val.calendar_id; |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -841,7 +848,7 @@ export default { |
|
|
|
this.searchData.limit = -1 |
|
|
|
this.searchData.page = 1 |
|
|
|
await getToolInfoList(this.searchData).then(({data}) => { |
|
|
|
this.exportList= data.page.list; |
|
|
|
this.exportList = data.page.list; |
|
|
|
}) |
|
|
|
|
|
|
|
return this.exportList; |
|
|
|
@ -875,7 +882,7 @@ export default { |
|
|
|
this.dataList = data.rows; |
|
|
|
this.totalPage = data.total; |
|
|
|
//判断是否存在 |
|
|
|
if(this.dataList && this.dataList.length > 0){ |
|
|
|
if (this.dataList && this.dataList.length > 0) { |
|
|
|
this.$refs.mainTable.setCurrentRow(this.dataList[0]); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -884,7 +891,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*新增工具的modal*/ |
|
|
|
addToolInfoModal(){ |
|
|
|
addToolInfoModal() { |
|
|
|
//打开modal的页面 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.toolInfoAddUpdate.init(null, true) |
|
|
|
@ -892,7 +899,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*编辑工具信息*/ |
|
|
|
editToolInfoModal(toolInfo){ |
|
|
|
editToolInfoModal(toolInfo) { |
|
|
|
//打开modal的页面 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.toolInfoAddUpdate.init(toolInfo, false) |
|
|
|
@ -900,7 +907,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*工具属性的维护*/ |
|
|
|
editToolInfoPropertyModal(toolInfo){ |
|
|
|
editToolInfoPropertyModal(toolInfo) { |
|
|
|
//打开modal的页面 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.toolPropertyShow.init(toolInfo, 'TL'); |
|
|
|
@ -908,7 +915,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*工具实例属性的维护*/ |
|
|
|
editToolInstancePropertyModal(toolInfo){ |
|
|
|
editToolInstancePropertyModal(toolInfo) { |
|
|
|
//打开modal的页面 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.toolPropertyShow.init(toolInfo, 'TLI'); |
|
|
|
@ -917,7 +924,7 @@ export default { |
|
|
|
|
|
|
|
/*删除工具的确认选项*/ |
|
|
|
deleteToolInfoConfirm(toolInfo) { |
|
|
|
this.$confirm('是否删除工具标识号:'+ toolInfo.toolId+'?', '提示', { |
|
|
|
this.$confirm('是否删除工具标识号:' + toolInfo.toolId + '?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
@ -934,28 +941,28 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*新增工具实例的modal*/ |
|
|
|
addToolInstanceModal(){ |
|
|
|
addToolInstanceModal() { |
|
|
|
//判断是否选择好数据 |
|
|
|
if(this.currentRow && Object.keys(this.currentRow).length > 0){ |
|
|
|
if (this.currentRow && Object.keys(this.currentRow).length > 0) { |
|
|
|
//打开modal的页面 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.toolInstanceAddUpdate.init(this.currentRow, true) |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.$message.error('请先选择工具信息再添加工具实例!'); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*修改工具实例的modal*/ |
|
|
|
editToolInstanceModal(row){ |
|
|
|
editToolInstanceModal(row) { |
|
|
|
this.currentInstanceRow = row; |
|
|
|
//判断是否选择好数据 |
|
|
|
if(Object.keys(this.currentInstanceRow).length > 0){ |
|
|
|
if (Object.keys(this.currentInstanceRow).length > 0) { |
|
|
|
//打开modal的页面 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.toolInstanceAddUpdate.init(this.currentInstanceRow, false) |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.$message.error('请先选择工具实例再添加工具实例!'); |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -971,8 +978,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*删除工具实例确认*/ |
|
|
|
deleteToolInstanceConfirm(toolInfo){ |
|
|
|
this.$confirm('是否删除工具实例:'+ toolInfo.toolInstance+'?', '提示', { |
|
|
|
deleteToolInstanceConfirm(toolInfo) { |
|
|
|
this.$confirm('是否删除工具实例:' + toolInfo.toolInstance + '?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
@ -989,19 +996,19 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*工具实例的生命周期*/ |
|
|
|
editToolInstanceDateModal(toolInfo){ |
|
|
|
editToolInstanceDateModal(toolInfo) { |
|
|
|
this.currentInstanceRow = toolInfo; |
|
|
|
//添加工具分类和分类的描述信息 |
|
|
|
this.currentInstanceRow.toolType = this.currentRow.toolType; |
|
|
|
this.currentInstanceRow.toolDesc = this.currentRow.toolDesc; |
|
|
|
|
|
|
|
//判断是否选择好数据 |
|
|
|
if(Object.keys(this.currentInstanceRow).length > 0){ |
|
|
|
if (Object.keys(this.currentInstanceRow).length > 0) { |
|
|
|
//打开modal的页面 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.toolInstanceDateShow.init(this.currentInstanceRow) |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.$message.error('请先选择工具实例再添加工具实例!'); |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -1009,51 +1016,52 @@ export default { |
|
|
|
//切换工具触发 |
|
|
|
changeData(row) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
|
|
|
this.refreshCurrentTabTable (); |
|
|
|
this.refreshCurrentTabTable(); |
|
|
|
}, |
|
|
|
|
|
|
|
/*切换工具实例*/ |
|
|
|
changeInstanceData(row){ |
|
|
|
changeInstanceData(row) { |
|
|
|
this.currentInstanceRow = JSON.parse(JSON.stringify(row)); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取数据列表 |
|
|
|
search () { |
|
|
|
search() { |
|
|
|
getToolInfoList(this.searchData).then(({data}) => { |
|
|
|
if (data.code == 200) { |
|
|
|
this.dataList = data.rows; |
|
|
|
this.totalPage = data.total; |
|
|
|
if(this.dataList.length > 0){ |
|
|
|
if (this.dataList.length > 0) { |
|
|
|
this.$refs.mainTable.setCurrentRow(this.dataList[0]); |
|
|
|
//如果已经存在则 不修改默认数值 不然修改默认选择行为第一行 |
|
|
|
if(this.currentRow && Object.keys(this.currentRow).length > 0){ |
|
|
|
//已经存在 不需要修改 |
|
|
|
}else{ |
|
|
|
if (this.currentRow && Object.keys(this.currentRow).length > 0) { |
|
|
|
//已经存在 不需要修改 |
|
|
|
} else { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList[0])); |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.currentRow ={} |
|
|
|
} else { |
|
|
|
this.currentRow = {} |
|
|
|
} |
|
|
|
this.refreshCurrentTabTable () |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
} |
|
|
|
this.dataListLoading = false |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
tabClick (tab, event) { |
|
|
|
tabClick(tab, event) { |
|
|
|
// 刷新列表数据 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
}, |
|
|
|
// 刷新页签的table数据 |
|
|
|
refreshCurrentTabTable () { |
|
|
|
refreshCurrentTabTable() { |
|
|
|
if (this.activeName == 'detail') { |
|
|
|
this.refreshToolInstanceData(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*刷新工具实例的信息*/ |
|
|
|
refreshToolInstanceData(){ |
|
|
|
refreshToolInstanceData() { |
|
|
|
getToolInstanceList(this.currentRow).then(({data}) => { |
|
|
|
if (data.code == 200) { |
|
|
|
this.detailList = data.rows; |
|
|
|
@ -1063,11 +1071,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 下载 |
|
|
|
downloadFile(row){ |
|
|
|
downloadFile(row) { |
|
|
|
downLoadProjectFile(row) |
|
|
|
.then(({data}) => { |
|
|
|
// 不限制文件下载类型 |
|
|
|
const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'}) |
|
|
|
const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'}) |
|
|
|
// 下载文件名称 |
|
|
|
const fileName = row.fileName |
|
|
|
// a标签下载 |
|
|
|
@ -1094,7 +1102,7 @@ export default { |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 每页数 |
|
|
|
sizeChangeHandle (val) { |
|
|
|
sizeChangeHandle(val) { |
|
|
|
this.searchData.pageSize = val; |
|
|
|
this.searchData.pageIndex = 1; |
|
|
|
this.search(); |
|
|
|
@ -1109,18 +1117,23 @@ export default { |
|
|
|
/*调整等待派工单的等待时间*/ |
|
|
|
changeCurrentToolInfo(tempData, searchFlag) { |
|
|
|
//判断是否是新增的数据 |
|
|
|
if(tempData.addFlag && searchFlag){ |
|
|
|
if (tempData.addFlag && searchFlag) { |
|
|
|
//重置查询的条件 |
|
|
|
this.searchData.site = tempData.site; |
|
|
|
this.searchData.toolId = tempData.toolId; |
|
|
|
//调用传的方法 |
|
|
|
this.refreshTooInfoData(); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
//重置选择行 |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(tempData)); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
changeCurrentToolRow(tempData) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(tempData)); |
|
|
|
this.refreshCurrentTabTable(); |
|
|
|
}, |
|
|
|
|
|
|
|
/*调整等待派工单的等待时间*/ |
|
|
|
changeCurrentToolInstance(tempData) { |
|
|
|
//重置选择行 |
|
|
|
@ -1128,16 +1141,16 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/*选中行的样式*/ |
|
|
|
rowToolStyle ({row}) { |
|
|
|
rowToolStyle({row}) { |
|
|
|
if (this.currentRow.site === row.site && this.currentRow.toolId === row.toolId) { |
|
|
|
return { 'background-color': '#D9EDF7', cursor: 'pointer' }; |
|
|
|
return {'background-color': '#D9EDF7', cursor: 'pointer'}; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*选中行的样式*/ |
|
|
|
rowToolInstanceStyle ({row}) { |
|
|
|
rowToolInstanceStyle({row}) { |
|
|
|
if (this.currentInstanceRow.site === row.site && this.currentInstanceRow.toolInstance === row.toolInstance) { |
|
|
|
return { 'background-color': '#D9EDF7', cursor: 'pointer' }; |
|
|
|
return {'background-color': '#D9EDF7', cursor: 'pointer'}; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1152,6 +1165,7 @@ export default { |
|
|
|
/deep/ .customer-tab .el-tabs__content { |
|
|
|
padding: 0px !important; |
|
|
|
} |
|
|
|
|
|
|
|
.el-transfer-panel { |
|
|
|
border: 2px solid #17b3a3; |
|
|
|
border-radius: 4px; |
|
|
|
|