feat: 暂时移除任务池操作按钮

master
zangch@mesnac.com 20 hours ago
parent e9df382c99
commit 599abd4e73

@ -86,7 +86,11 @@
<el-table-column label="规则名称" align="center" prop="ruleName" v-if="columns[1].visible"/>
<el-table-column label="呼叫类型编码" align="center" prop="callTypeCode" v-if="columns[2].visible"/>
<el-table-column label="适用产线编码" align="center" prop="productLineCode" v-if="columns[3].visible"/>
<el-table-column label="适用工位/工序编码" align="center" prop="stationCode" v-if="columns[4].visible"/>
<el-table-column label="绑定工位" align="center" prop="stationCode" v-if="columns[4].visible">
<template slot-scope="scope">
<span>{{ formatStationLabel(scope.row.stationCode) }}</span>
</template>
</el-table-column>
<el-table-column label="适用班组编码" align="center" prop="teamCode" v-if="columns[5].visible"/>
<el-table-column label="限定触发源类型" align="center" prop="sourceType" v-if="columns[6].visible"/>
<el-table-column label="确认时限" align="center" prop="ackTimeoutMin" v-if="columns[7].visible"/>
@ -155,9 +159,9 @@
<el-select v-model="form.stationCode" placeholder="请选择绑定的工位(必填)" filterable style="width: 100%">
<el-option
v-for="item in processStationList"
:key="item.stationCode"
:label="item.stationName + ' (' + item.stationCode + ')'"
:value="item.stationCode"
:key="item.productLineCode"
:label="formatStationOptionLabel(item)"
:value="item.productLineCode"
/>
</el-select>
</el-form-item>
@ -210,7 +214,6 @@
import { listAndonRule, getAndonRule, delAndonRule, addAndonRule, updateAndonRule } from "@/api/production/andonRule";
import { selectUserList } from "@/api/system/user";
import { findProductLineList } from "@/api/base/productLine";
import { listProcessStation } from "@/api/base/processStation";
import { getTeamMemberList } from "@/api/base/teamMembers";
import { getDeviceLedgerList } from "@/api/base/deviceLedger";
@ -241,7 +244,7 @@ export default {
defaultUserId: null,
// 线
productLineList: [],
// /
//
processStationList: [],
//
teamMembersList: [],
@ -443,8 +446,25 @@ export default {
const nameMap = new Map(this.userOptions.map(u => [String(u.userId), (u.nickName || u.userName || String(u.userId))]));
return ids.map(id => nameMap.get(String(id)) || id).join(', ');
},
//
formatStationLabel(stationCode) {
if (!stationCode) return '';
const station = this.processStationList.find(item => String(item.productLineCode) === String(stationCode));
if (!station) return stationCode;
return this.formatStationOptionLabel(station);
},
// productLine / productLineCode/productLineName
formatStationOptionLabel(station) {
if (!station) return '';
const stationName = station.productLineName || station.stationName || '';
const stationCode = station.productLineCode || station.stationCode || '';
if (stationName && stationCode) {
return `${stationName} (${stationCode})`;
}
return stationName || stationCode;
},
/** 删除按钮操作 */
handleDelete(row) {listProcessStation
handleDelete(row) {
const ruleIds = row.ruleId || this.ids;
this.$modal.confirm('是否确认删除安灯规则配置编号为"' + ruleIds + '"的数据项?').then(function() {
return delAndonRule(ruleIds);
@ -467,8 +487,9 @@ export default {
this.productLineList = [];
});
},
/** 加载工位/工序下拉选项 */
/** 加载工位下拉选项 */
loadProcessStations() {
// productLine productLineType=2
findProductLineList({ productLineType: 2 }).then(res => {
this.processStationList = res.data || res.rows || [];
}).catch(() => {

Loading…
Cancel
Save