|
|
@ -1,36 +1,102 @@ |
|
|
|
<template> |
|
|
|
<div class="operation-type-wrap"> |
|
|
|
<el-form :inline="true" ref="formRef" :model="formData" class="demo-form-inline"> |
|
|
|
<el-form |
|
|
|
:inline="true" |
|
|
|
ref="formRef" |
|
|
|
:model="formData" |
|
|
|
class="demo-form-inline" |
|
|
|
> |
|
|
|
<el-form-item :label="getColumnName('Operation-StepNo')"> |
|
|
|
<el-input v-model="formData['stepNo']" placeholder="请输入"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="getColumnName('Operation-WorkLineId')"> |
|
|
|
<el-select |
|
|
|
v-model="formData['workLineId']" |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in workLineList" |
|
|
|
:key="item['WorkLine-WorkLineid']" |
|
|
|
:label="item['WorkLine-Descr']" |
|
|
|
:value="item['WorkLine-WorkLineid']" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> |
|
|
|
<el-button type="warning" icon="el-icon-refresh" @click="reset">重置</el-button> |
|
|
|
<el-button type="primary" @click="setIsAddOrEdit('add')">新增</el-button> |
|
|
|
<el-button type="primary" icon="el-icon-search" @click="search" |
|
|
|
>查询</el-button |
|
|
|
> |
|
|
|
<el-button type="warning" icon="el-icon-refresh" @click="reset" |
|
|
|
>重置</el-button |
|
|
|
> |
|
|
|
<el-button type="primary" @click="setIsAddOrEdit('add')" |
|
|
|
>新增</el-button |
|
|
|
> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table border :data="tableData" style="width: 100%" :total="queryParams.total" :page.sync="queryParams.pageNumber" |
|
|
|
:limit.sync="queryParams.pageSize"> |
|
|
|
<el-table-column prop="Operation-PO" width="100" :label="getColumnName('Operation-PO')"> |
|
|
|
<el-table |
|
|
|
border |
|
|
|
:data="tableData" |
|
|
|
style="width: 100%" |
|
|
|
:total="queryParams.total" |
|
|
|
:page.sync="queryParams.pageNumber" |
|
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-PO" |
|
|
|
width="100" |
|
|
|
:label="getColumnName('Operation-PO')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="Operation-StepDesc" width="200" :label="getColumnName('Operation-StepDesc')"> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-WorkLineId" |
|
|
|
width="100" |
|
|
|
:label="getColumnName('Operation-WorkLineId')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="Operation-StepNo" :label="getColumnName('Operation-StepNo')"> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-StepDesc" |
|
|
|
width="200" |
|
|
|
:label="getColumnName('Operation-StepDesc')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="Operation-StepType" width="150" :label="getColumnName('Operation-StepType')"> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-StepNo" |
|
|
|
:label="getColumnName('Operation-StepNo')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="Operation-ProjectId" width="200" :label="getColumnName('Operation-ProjectId')"> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-StepType" |
|
|
|
width="150" |
|
|
|
:label="getColumnName('Operation-StepType')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="Operation-OperationId" width="100" :label="getColumnName('Operation-OperationId')"> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-ProjectId" |
|
|
|
width="200" |
|
|
|
:label="getColumnName('Operation-ProjectId')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="Operation-AttrCode" :label="getColumnName('Operation-AttrCode')"> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-OperationId" |
|
|
|
width="100" |
|
|
|
:label="getColumnName('Operation-OperationId')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="Operation-AttrValue" :label="getColumnName('Operation-AttrValue')"> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-AttrCode" |
|
|
|
:label="getColumnName('Operation-AttrCode')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-AttrValue" |
|
|
|
:label="getColumnName('Operation-AttrValue')" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-ActivateInStation" |
|
|
|
width="100" |
|
|
|
width="100" |
|
|
|
:label="getColumnName('Operation-ActivateInStation')" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -45,7 +111,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="Operation-ActivateWhenRepair" |
|
|
|
width="100" |
|
|
|
width="100" |
|
|
|
:label="getColumnName('Operation-ActivateWhenRepair')" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -59,14 +125,25 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="400" align="center" fixed="right"> |
|
|
|
<!-- <el-table-column label="操作" width="650" align="center" fixed="right"> --> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button size="mini" @click="setItem(scope.row)">编辑</el-button> |
|
|
|
<!-- <el-button size="mini" :disabled="scope.row['Operation-StepType'] != 'OPC通讯'" @click="setOPCCommunication(scope.row)">配置OPC通讯</el-button> --> |
|
|
|
<!-- <el-button size="mini" :disabled="scope.row['Operation-StepType'] != '开放协议'" @click="setOpenProtocol(scope.row)">配置开放协议</el-button> --> |
|
|
|
<el-button size="mini" :disabled="scope.row['Operation-StepType'] != '指导操作'" @click="setOperationGuide(scope.row)">配置操作指导</el-button> |
|
|
|
<el-button size="mini" :disabled="scope.row['Operation-StepType'] != '扫码校验'" @click="setScanRule(scope.row)">配置扫码规则</el-button> |
|
|
|
<el-button size="mini" type="danger" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
<!-- <el-button size="mini" v-if="scope.row['Operation-StepType'] == 'OPC通讯'" @click="setOPCCommunication(scope.row)">配置OPC通讯</el-button> --> |
|
|
|
<!-- <el-button size="mini" v-if="scope.row['Operation-StepType'] == '开放协议'" @click="setOpenProtocol(scope.row)">配置开放协议</el-button> --> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
:disabled="scope.row['Operation-StepType'] != '指导操作'" |
|
|
|
@click="setOperationGuide(scope.row)" |
|
|
|
>配置操作指导</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
:disabled="scope.row['Operation-StepType'] != '扫码校验'" |
|
|
|
@click="setScanRule(scope.row)" |
|
|
|
>配置扫码规则</el-button |
|
|
|
> |
|
|
|
<el-button size="mini" type="danger" @click="handleDelete(scope.row)" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -77,11 +154,36 @@ |
|
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
@pagination="getTableList" |
|
|
|
/> |
|
|
|
<AddOrEdit v-if="isAddOrEdit=='add' || isAddOrEdit=='edit'" :isAddOrEdit="isAddOrEdit" :item="item" @setIsAddOrEdit="setIsAddOrEdit" /> |
|
|
|
<ScanRule v-if="isAddOrEdit=='scanRule'" :isAddOrEdit="isAddOrEdit" :item="item" @setIsAddOrEdit="setIsAddOrEdit" /> |
|
|
|
<OperationGuide v-if="isAddOrEdit=='operationGuide'" :isAddOrEdit="isAddOrEdit" :item="item" @setIsAddOrEdit="setIsAddOrEdit" /> |
|
|
|
<OPCCommunication v-if="isAddOrEdit=='OPCCommunication'" :isAddOrEdit="isAddOrEdit" :item="item" @setIsAddOrEdit="setIsAddOrEdit" /> |
|
|
|
<OpenProtocol v-if="isAddOrEdit=='openProtocol'" :isAddOrEdit="isAddOrEdit" :item="item" @setIsAddOrEdit="setIsAddOrEdit" /> |
|
|
|
<AddOrEdit |
|
|
|
v-if="isAddOrEdit == 'add' || isAddOrEdit == 'edit'" |
|
|
|
:isAddOrEdit="isAddOrEdit" |
|
|
|
:item="item" |
|
|
|
@setIsAddOrEdit="setIsAddOrEdit" |
|
|
|
/> |
|
|
|
<ScanRule |
|
|
|
v-if="isAddOrEdit == 'scanRule'" |
|
|
|
:isAddOrEdit="isAddOrEdit" |
|
|
|
:item="item" |
|
|
|
@setIsAddOrEdit="setIsAddOrEdit" |
|
|
|
/> |
|
|
|
<OperationGuide |
|
|
|
v-if="isAddOrEdit == 'operationGuide'" |
|
|
|
:isAddOrEdit="isAddOrEdit" |
|
|
|
:item="item" |
|
|
|
@setIsAddOrEdit="setIsAddOrEdit" |
|
|
|
/> |
|
|
|
<OPCCommunication |
|
|
|
v-if="isAddOrEdit == 'OPCCommunication'" |
|
|
|
:isAddOrEdit="isAddOrEdit" |
|
|
|
:item="item" |
|
|
|
@setIsAddOrEdit="setIsAddOrEdit" |
|
|
|
/> |
|
|
|
<OpenProtocol |
|
|
|
v-if="isAddOrEdit == 'openProtocol'" |
|
|
|
:isAddOrEdit="isAddOrEdit" |
|
|
|
:item="item" |
|
|
|
@setIsAddOrEdit="setIsAddOrEdit" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
@ -90,7 +192,7 @@ import ScanRule from './scanRule.vue'; |
|
|
|
import OperationGuide from './operationGuide.vue'; |
|
|
|
import OPCCommunication from './OPCCommunication.vue'; |
|
|
|
import OpenProtocol from './openProtocol.vue'; |
|
|
|
import {getTableList, delParser, getAttribute, getAttributeValue} from '@/api/plant/processData/technology' |
|
|
|
import {getTableList, delParser, getAttribute, getWorkLineList, getAttributeValue} from '@/api/plant/processData/technology' |
|
|
|
export default { |
|
|
|
components:{ |
|
|
|
AddOrEdit, |
|
|
@ -111,7 +213,7 @@ export default { |
|
|
|
isAddOrEdit: '', // add-添加,edit-修改 |
|
|
|
item:{}, // 当前要编辑的对象 |
|
|
|
attributeList:[], // 属性编码列表 |
|
|
|
|
|
|
|
workLineList:[], // 产线列表 |
|
|
|
} |
|
|
|
}, |
|
|
|
methods:{ |
|
|
@ -180,7 +282,8 @@ export default { |
|
|
|
getTableList({ |
|
|
|
...this.queryParams, |
|
|
|
...this.formData, |
|
|
|
'detailId':this.formData['detailId'] ? this.formData['detailId'] : undefined |
|
|
|
'stepNo':this.formData['stepNo'] ? this.formData['stepNo'] : undefined, |
|
|
|
'workLineId':this.formData['workLineId'] ? this.formData['workLineId'] : undefined |
|
|
|
}).then(({data:{count=0, records=[]}})=>{ |
|
|
|
this.queryParams.total=count; |
|
|
|
this.tableData=records; |
|
|
@ -198,6 +301,15 @@ export default { |
|
|
|
this.attrValueList=Valst; |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取产线列表 |
|
|
|
getWorkLineList(){ |
|
|
|
getWorkLineList().then(({data=[]})=>{ |
|
|
|
this.workLineList=data; |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
created(){ |
|
|
|
this.getWorkLineList(); |
|
|
|
}, |
|
|
|
mounted(){ |
|
|
|
this.getTableList(); |
|
|
@ -205,11 +317,11 @@ export default { |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.operation-type-wrap{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
box-sizing: border-box; |
|
|
|
padding: 10px; |
|
|
|
padding-top: 36px; |
|
|
|
} |
|
|
|
.operation-type-wrap { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
box-sizing: border-box; |
|
|
|
padding: 10px; |
|
|
|
padding-top: 36px; |
|
|
|
} |
|
|
|
</style> |