|
|
@@ -11,13 +11,16 @@
|
|
|
<!-- 清空条件 -->
|
|
|
<BaseIndexButton right-button="workStation-clear" ref="clear" name="clear"></BaseIndexButton>
|
|
|
<!-- 编辑 -->
|
|
|
- <BaseIndexButton v-if="formType==$config.formCode.workStation" right-button="workStation-edit" ref="edit" name="edit"></BaseIndexButton>
|
|
|
+ <BaseIndexButton v-if="formType==$config.formCode.workStation" right-button="workStation-edit" ref="edit"
|
|
|
+ name="edit"></BaseIndexButton>
|
|
|
<!-- 编辑标签打印机 -->
|
|
|
- <BaseIndexButton v-if="formType==$config.formCode.stationPrinter" right-button="workStation-editPrinter" ref="editPrinter" name="editPrinter"></BaseIndexButton>
|
|
|
+ <BaseIndexButton v-if="formType==$config.formCode.stationPrinter" right-button="workStation-editPrinter"
|
|
|
+ ref="editPrinter" name="editPrinter"></BaseIndexButton>
|
|
|
</template>
|
|
|
<template #right>
|
|
|
<!-- 新建 -->
|
|
|
- <BaseIndexButton v-if="formType==$config.formCode.workStation" right-button="workStation-add" ref="add" name="add"></BaseIndexButton>
|
|
|
+ <BaseIndexButton v-if="formType==$config.formCode.workStation" right-button="workStation-add" ref="add"
|
|
|
+ name="add"></BaseIndexButton>
|
|
|
</template>
|
|
|
</BaseIndexButtonGroup>
|
|
|
|
|
|
@@ -34,32 +37,33 @@
|
|
|
:page-total="pageInfo.total"
|
|
|
:current-page="pageInfo.currentPage"
|
|
|
:multiple="false"
|
|
|
- :height="this.tableHeight * split - 45" primaryKey="stationId"
|
|
|
+ :height="this.tableHeight * split - 35" primaryKey="stationId"
|
|
|
@current-change="currentChangeEvent($event)"
|
|
|
:choose-flag="false"
|
|
|
@pageChange="pageSizeChange">
|
|
|
- <DkTableColumn field="stationCode" type="link"
|
|
|
+ <DkTableColumn field="stationName" type="link"
|
|
|
@on-link="formType==$config.formCode.workStation?handleLink(Object.assign($event,{button:'edit'}))
|
|
|
:handleLink(Object.assign($event,{button:'editPrinter'}))"></DkTableColumn>
|
|
|
- <DkTableColumn field="stationName"></DkTableColumn>
|
|
|
<DkTableColumn field="workShopName"></DkTableColumn>
|
|
|
<DkTableColumn field="levelName" :title="$t('workSpaceId')" width="280"></DkTableColumn>
|
|
|
<DkTableColumn field="nodeName"></DkTableColumn>
|
|
|
-<!-- <DkTableColumn field="stationUsers"></DkTableColumn>-->
|
|
|
- <DkTableColumn field="uniqueCode" :title="$t('kilnCode')" ></DkTableColumn>
|
|
|
+ <!-- <DkTableColumn field="stationUsers"></DkTableColumn>-->
|
|
|
+ <DkTableColumn field="uniqueCode" :title="$t('kilnCode')"></DkTableColumn>
|
|
|
+ <DkTableColumn field="stationCode"></DkTableColumn>
|
|
|
<DkTableColumn field="flgValid" type="switch" :title="$t('flgValid')" @on-switch-change="onSwitchChange"
|
|
|
:switch-disabled=false min-width="100px"></DkTableColumn>
|
|
|
<DkTableColumn field="remarks" min-width="200" width="auto" :filter=false></DkTableColumn>
|
|
|
</DkTable>
|
|
|
|
|
|
<div slot="bottom">
|
|
|
- <DkTabs v-model="workStationDetailTab" :options="formType==$config.formCode.workStation?detailOptions:labelPrinterDetailOptions"></DkTabs>
|
|
|
+ <DkTabs v-model="workStationDetailTab"
|
|
|
+ :options="formType==$config.formCode.workStation?detailOptions:labelPrinterDetailOptions"></DkTabs>
|
|
|
<!-- 用户 -->
|
|
|
<DkTable v-show="workStationDetailTab === this.$config.workStationDetailTab.workStationUser" :pageFlag="false"
|
|
|
:pageTotalFlag="false"
|
|
|
primaryKey="userId"
|
|
|
:id="'table-'+$options.name"
|
|
|
- :height="this.tableHeight * (1-split) - 15"
|
|
|
+ :height="this.tableHeight * (1-split) -10"
|
|
|
name="table"
|
|
|
ref="workTeam-select"
|
|
|
:choose-flag="false"
|
|
|
@@ -71,7 +75,8 @@
|
|
|
</DkTable>
|
|
|
|
|
|
<!--打印机信息-->
|
|
|
- <DkTable v-show="workStationDetailTab === this.$config.workStationDetailTab.workStationPrinter" :pageFlag="false"
|
|
|
+ <DkTable v-show="workStationDetailTab === this.$config.workStationDetailTab.workStationPrinter"
|
|
|
+ :pageFlag="false"
|
|
|
:pageTotalFlag="false"
|
|
|
primaryKey="wspId"
|
|
|
:id="'table-'+$options.name"
|
|
|
@@ -89,9 +94,9 @@
|
|
|
</DkTable>
|
|
|
</div>
|
|
|
</DkSplit>
|
|
|
-<!-- <div>-->
|
|
|
+ <!-- <div>-->
|
|
|
|
|
|
-<!-- </div>-->
|
|
|
+ <!-- </div>-->
|
|
|
<!--新建编辑-->
|
|
|
<DkModal
|
|
|
:loading="loading"
|
|
|
@@ -102,13 +107,13 @@
|
|
|
:saveFlag="true"
|
|
|
:title=modalTitle
|
|
|
>
|
|
|
- <DkForm ref="formInline" v-model="formData" :col-count="1" >
|
|
|
+ <DkForm ref="formInline" v-model="formData" :col-count="1">
|
|
|
<!-- 工位代码 -->
|
|
|
<DkFormItem prop="stationCode">
|
|
|
<InputPop v-model="formData.stationCode" ref="stationCode" :readonly="true"/>
|
|
|
</DkFormItem>
|
|
|
<!-- 工位名称 -->
|
|
|
- <DkFormItem prop="stationName" >
|
|
|
+ <DkFormItem prop="stationName">
|
|
|
<InputPop v-model="formData.stationName" ref="stationName" :readonly="true"/>
|
|
|
</DkFormItem>
|
|
|
<!-- 工艺节点-->
|
|
|
@@ -126,7 +131,7 @@
|
|
|
</DkForm>
|
|
|
|
|
|
<!-- 工位打印机 -->
|
|
|
- <div style="padding: 10px 17px 10px 10px" >
|
|
|
+ <div style="padding: 10px 17px 10px 10px">
|
|
|
<EditTable slot="content" ref="editTableWSPrinter"
|
|
|
:data="workStationPrinterList"
|
|
|
:show-setting-flag="false"
|
|
|
@@ -154,25 +159,25 @@ export default {
|
|
|
let self = this
|
|
|
return {
|
|
|
editAddModal: false,
|
|
|
- nodeKind:'',
|
|
|
+ nodeKind: '',
|
|
|
modalTitle: '',//新建编辑弹窗名称
|
|
|
submitType: '',//新建编辑提交类型
|
|
|
- workStationUserList:[], //工位工号
|
|
|
- delWorkStationUserList:[],//删除工位工号
|
|
|
+ workStationUserList: [], //工位工号
|
|
|
+ delWorkStationUserList: [],//删除工位工号
|
|
|
formData: {
|
|
|
stationId: null,
|
|
|
stationCode: '',
|
|
|
- stationName:'',
|
|
|
- flowNodeId:null,
|
|
|
- nodeName:'',
|
|
|
+ stationName: '',
|
|
|
+ flowNodeId: null,
|
|
|
+ nodeName: '',
|
|
|
spaceId: null,
|
|
|
- kilnId:null,
|
|
|
+ kilnId: null,
|
|
|
remarks: '',
|
|
|
},
|
|
|
- spaceList:[],
|
|
|
- kilnList:[],
|
|
|
+ spaceList: [],
|
|
|
+ kilnList: [],
|
|
|
//工位打印机数组
|
|
|
- workStationPrinterList:[],
|
|
|
+ workStationPrinterList: [],
|
|
|
//工位打印机
|
|
|
editTableWSPrinterColumn: [
|
|
|
//打印机
|
|
|
@@ -182,7 +187,7 @@ export default {
|
|
|
width: 'auto',
|
|
|
labelKey: 'printerName',
|
|
|
valueKey: 'printerId',
|
|
|
- controlId:'printerId',
|
|
|
+ controlId: 'printerId',
|
|
|
options: () => self.printerList,
|
|
|
},
|
|
|
//打印类型
|
|
|
@@ -209,7 +214,7 @@ export default {
|
|
|
{field: 'remarks', type: 'text', width: 'auto'},
|
|
|
],
|
|
|
users: [],
|
|
|
- userKindList:[],
|
|
|
+ userKindList: [],
|
|
|
searchContent: [
|
|
|
{
|
|
|
itemCode: 'stationCode',
|
|
|
@@ -267,7 +272,7 @@ export default {
|
|
|
*/
|
|
|
getData(params) {
|
|
|
// 查询数据
|
|
|
- let excute = this.excute(this.$service.workStationService, this.$service.workStationService.selectByCond, params);
|
|
|
+ let excute = this.excute(this.$service.workStationService, this.$service.workStationService.selectByCond, params);
|
|
|
excute.then(res => {
|
|
|
if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
this.workStationUser = []
|
|
|
@@ -288,14 +293,14 @@ export default {
|
|
|
this.formData = {
|
|
|
stationId: null,
|
|
|
stationCode: '',
|
|
|
- stationName:'',
|
|
|
- flowNodeId:null,
|
|
|
- nodeName:'',
|
|
|
+ stationName: '',
|
|
|
+ flowNodeId: null,
|
|
|
+ nodeName: '',
|
|
|
spaceId: null,
|
|
|
- kilnId:null,
|
|
|
+ kilnId: null,
|
|
|
remarks: '',
|
|
|
}
|
|
|
- this.workStationPrinterList=[]
|
|
|
+ this.workStationPrinterList = []
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 给参数赋值
|
|
|
@@ -306,10 +311,10 @@ export default {
|
|
|
this.params.stationId = this.formData.stationId // 工位Id
|
|
|
this.params.ftyId = this.$store.state.user.ftyId // 工厂Id
|
|
|
//过滤空行
|
|
|
- this.workStationPrinterList=this.$refs.editTableWSPrinter.getTableData();
|
|
|
- this.params.workStationPrinterList = this.workStationPrinterList.filter(item=>item.printerId > 0)
|
|
|
+ this.workStationPrinterList = this.$refs.editTableWSPrinter.getTableData();
|
|
|
+ this.params.workStationPrinterList = this.workStationPrinterList.filter(item => item.printerId > 0)
|
|
|
//获取删除的数据
|
|
|
- this.params.delWorkStationPrinterList=this.$refs.editTableWSPrinter.getDeleteData();
|
|
|
+ this.params.delWorkStationPrinterList = this.$refs.editTableWSPrinter.getDeleteData();
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 保存校验
|
|
|
@@ -324,11 +329,17 @@ export default {
|
|
|
continue;
|
|
|
}
|
|
|
if (!printer[i].printerId) {
|
|
|
- this.$Message.warning(this.$t('printerInformation') + ':' + this.$t('W_089', {'param1': (i + 1), 'param2': this.$t('printerId')}) + ';')
|
|
|
+ this.$Message.warning(this.$t('printerInformation') + ':' + this.$t('W_089', {
|
|
|
+ 'param1': (i + 1),
|
|
|
+ 'param2': this.$t('printerId')
|
|
|
+ }) + ';')
|
|
|
return false;
|
|
|
}
|
|
|
if (!printer[i].printLayoutId && !printer[i].printType) {
|
|
|
- this.$Message.warning(this.$t('printerInformation') + ':' + this.$t('W_089', {'param1': (i + 1), 'param2': this.$t('printLayoutId') + this.$t('or') + this.$t('printType')}) + ';')
|
|
|
+ this.$Message.warning(this.$t('printerInformation') + ':' + this.$t('W_089', {
|
|
|
+ 'param1': (i + 1),
|
|
|
+ 'param2': this.$t('printLayoutId') + this.$t('or') + this.$t('printType')
|
|
|
+ }) + ';')
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -395,7 +406,7 @@ export default {
|
|
|
* @author : 姜宁
|
|
|
* @date : 2023/3/16 10:37
|
|
|
*/
|
|
|
- choosePrinterData(row, rowIndex, colItem){
|
|
|
+ choosePrinterData(row, rowIndex, colItem) {
|
|
|
// 如果选择打印分类需要清空打印模板,选择打印模板需要清空打印分类
|
|
|
if (colItem.field === 'printType') {
|
|
|
if (row[colItem.field]) {
|
|
|
@@ -421,7 +432,7 @@ export default {
|
|
|
this.formData = res.data
|
|
|
}
|
|
|
})
|
|
|
- let params ={
|
|
|
+ let params = {
|
|
|
ftyId: this.$store.state.user.ftyId,
|
|
|
stationId: id
|
|
|
}
|
|
|
@@ -432,14 +443,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- /**
|
|
|
- * @desc : 生产工号行切换事件
|
|
|
- * @author : 姜宁
|
|
|
- * @date : 2023/3/14 17:10
|
|
|
- */
|
|
|
+ /**
|
|
|
+ * @desc : 生产工号行切换事件
|
|
|
+ * @author : 姜宁
|
|
|
+ * @date : 2023/3/14 17:10
|
|
|
+ */
|
|
|
currentChangeEvent({row}) {
|
|
|
if (row != null) {
|
|
|
- if (this.formType==this.$config.formCode.workStation){
|
|
|
+ if (this.formType == this.$config.formCode.workStation) {
|
|
|
// 获取用户信息
|
|
|
this.getWorkStationUserList(row.stationId);
|
|
|
}
|
|
|
@@ -458,8 +469,8 @@ export default {
|
|
|
ftyId: this.$store.state.user.ftyId,
|
|
|
stationId: stationId
|
|
|
}
|
|
|
- this.excute(this.$service.workStationUserService,this.$service.workStationUserService.getWorkStationUser,params).then(res =>{
|
|
|
- if(res.code === this.$config.SUCCESS_CODE){
|
|
|
+ this.excute(this.$service.workStationUserService, this.$service.workStationUserService.getWorkStationUser, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
this.workStationUser = res.data
|
|
|
}
|
|
|
})
|
|
|
@@ -488,11 +499,10 @@ export default {
|
|
|
* @date : 2023/2/15 16:13
|
|
|
*/
|
|
|
chooseNode(rows) {
|
|
|
- if (rows){
|
|
|
+ if (rows) {
|
|
|
this.formData.flowNodeId = rows[0].nodeId;
|
|
|
this.nodeKind = rows[0].kindCode
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
this.formData.flowNodeId = '';
|
|
|
this.nodeKind = ''
|
|
|
}
|
|
|
@@ -527,11 +537,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- /**
|
|
|
- * @desc : 查询打印分类
|
|
|
- * @author : 姜宁
|
|
|
- * @date : 2023/3/16 11:50
|
|
|
- */
|
|
|
+ /**
|
|
|
+ * @desc : 查询打印分类
|
|
|
+ * @author : 姜宁
|
|
|
+ * @date : 2023/3/16 11:50
|
|
|
+ */
|
|
|
getLabelPrintType() {
|
|
|
let params = {
|
|
|
ftyId: this.$store.state.user.ftyId,
|
|
|
@@ -542,11 +552,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- /**
|
|
|
- * @desc : 查询打印模板
|
|
|
- * @author : 姜宁
|
|
|
- * @date : 2023/3/16 11:50
|
|
|
- */
|
|
|
+ /**
|
|
|
+ * @desc : 查询打印模板
|
|
|
+ * @author : 姜宁
|
|
|
+ * @date : 2023/3/16 11:50
|
|
|
+ */
|
|
|
getLabelPrintLayout() {
|
|
|
let params = {
|
|
|
ftyId: this.$store.state.user.ftyId,
|
|
|
@@ -562,17 +572,16 @@ export default {
|
|
|
* @author : 周兴
|
|
|
* @date : 2023/2/8 12:55
|
|
|
*/
|
|
|
- createdInit(){
|
|
|
+ createdInit() {
|
|
|
this.primaryKey = 'stationId' // 设置主键Id
|
|
|
this.routeObjName = 'workStation' // 设置路由名称
|
|
|
- if(this.formType==this.$config.formCode.stationPrinter){
|
|
|
+ if (this.formType == this.$config.formCode.stationPrinter) {
|
|
|
this.getFactorySpace(); // 加载工厂区域
|
|
|
this.getLabelPrinter(); //加载打印机
|
|
|
this.getLabelPrintType();//加载打印分类
|
|
|
this.getLabelPrintLayout();//加载打印模板
|
|
|
this.workStationDetailTab = this.$config.workStationDetailTab.workStationPrinter
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
this.workStationDetailTab = this.$config.workStationDetailTab.workStationUser
|
|
|
}
|
|
|
},
|