|
|
@@ -40,26 +40,68 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- // 使图标位于岗位上方-->
|
|
|
+ <div
|
|
|
+ v-for="(ticket, i) in (TicketListPage[item.entityId] && TicketListPage[item.entityId].slice(0, 3)) || []"
|
|
|
+ :key="'btn-' + i"
|
|
|
+ @click="handleTicketDialogVisible(item.entityId, item.entityName)"
|
|
|
+ :style="{
|
|
|
+ width: '28px',
|
|
|
+ height: '28px',
|
|
|
+ background: 'rgb(4, 134, 241)',
|
|
|
+ textAlign: 'center',
|
|
|
+ lineHeight: '28px',
|
|
|
+ fontSize: '20px',
|
|
|
+ color: 'white',
|
|
|
+ borderRadius: '5px',
|
|
|
+ position: 'absolute',
|
|
|
+ top: (item.y - 70) + 'px',
|
|
|
+ left: (item.x - ((TicketListPage[item.entityId] ? 3 * 35 : 0) - 53) / 2 + i * 40) + 'px',
|
|
|
+ cursor: 'pointer'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ {{ i + 1 }}
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 显示作业票图标,最多 3 个图标 -->
|
|
|
+
|
|
|
<img
|
|
|
- v-for="(ticket, index) in TicketListPage[item.entityId] || []"
|
|
|
- :key="ticket.ticketId"
|
|
|
+ v-for="(ticket, index) in (TicketListPage[item.entityId] && TicketListPage[item.entityId].slice(0, 3)) || []"
|
|
|
+ :key="'ticket-' + index"
|
|
|
:style="{
|
|
|
- width: '35px',
|
|
|
- height: '35px',
|
|
|
- position: 'absolute',
|
|
|
- cursor: 'pointer',
|
|
|
- top: (item.y - 40) + 'px', // 让图标浮在岗位的上方
|
|
|
- left: (
|
|
|
- item.x -
|
|
|
- ((TicketListPage[item.entityId] ? TicketListPage[item.entityId].length * 35 : 0) - 53) / 2 + // 计算总宽度并居中,减去单个图标宽度,确保居中
|
|
|
- index * 40 // 处理图标间隔
|
|
|
- ) + 'px'
|
|
|
- }"
|
|
|
- :src="imageMap[ticket.ticketType]"
|
|
|
+ width: '35px',
|
|
|
+ height: '35px',
|
|
|
+ position: 'absolute',
|
|
|
+ cursor: 'pointer',
|
|
|
+ top: (item.y - 40) + 'px', // 让图标浮在岗位的上方
|
|
|
+ left: (item.x - ((TicketListPage[item.entityId] ? 3 * 35 : 0) - 53) / 2 + index * 40) + 'px'
|
|
|
+ }"
|
|
|
+ :src="index === 2 && (TicketListPage[item.entityId] && TicketListPage[item.entityId].length > 3) ? imageMap[5] : imageMap[ticket.ticketType]"
|
|
|
alt=""
|
|
|
- @click="handleTicketClick(ticket)"
|
|
|
+ @click="index === 2 && (TicketListPage[item.entityId] && TicketListPage[item.entityId].length > 3) ? handleTicketDialogVisible(item.entityId, item.entityName) : handleTicketClick(ticket)"
|
|
|
+
|
|
|
/>
|
|
|
-<!--:src="require(`@/assets/images/${imageMap[ticket.ticketType]}.png`)"-->
|
|
|
+
|
|
|
+ <!-- <img-->
|
|
|
+ <!-- v-for="(ticket, index) in TicketListPage[item.entityId] || []"-->
|
|
|
+ <!-- :key="ticket.ticketId"-->
|
|
|
+ <!-- :style="{-->
|
|
|
+ <!-- width: '35px',-->
|
|
|
+ <!-- height: '35px',-->
|
|
|
+ <!-- position: 'absolute',-->
|
|
|
+ <!-- cursor: 'pointer',-->
|
|
|
+ <!-- top: (item.y - 40) + 'px', // 让图标浮在岗位的上方-->
|
|
|
+ <!-- left: (-->
|
|
|
+ <!-- item.x - -->
|
|
|
+ <!-- ((TicketListPage[item.entityId] ? TicketListPage[item.entityId].length * 35 : 0) - 53) / 2 + // 计算总宽度并居中,减去单个图标宽度,确保居中-->
|
|
|
+ <!-- index * 40 // 处理图标间隔-->
|
|
|
+ <!-- ) + 'px'-->
|
|
|
+ <!-- }"-->
|
|
|
+ <!-- :src="imageMap[ticket.ticketType]"-->
|
|
|
+ <!-- alt=""-->
|
|
|
+ <!-- @click="handleTicketClick(ticket)"-->
|
|
|
+ <!-- />-->
|
|
|
+ <!--:src="require(`@/assets/images/${imageMap[ticket.ticketType]}.png`)"-->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
@@ -737,6 +779,34 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-dialog>
|
|
|
+ <!-- 地图数字打开正在执行作业票页面-->
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="ticketVisible"
|
|
|
+ :title="`${currentWorkstationName} 进行中的作业`"
|
|
|
+ width="700px"
|
|
|
+ append-to-body
|
|
|
+ class="elDialog"
|
|
|
+ >
|
|
|
+ <el-table :data="TicketListPage[currentWorkstationId] || []">
|
|
|
+ <el-table-column label="编号" prop="ticketName" width="100">
|
|
|
+ <template slot-scope="scope" style="width: 50px">
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="图标" prop="ticketType" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <img :src="imageMap[scope.row.ticketType]" style="width:30px;height:30px"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="作业票名称" prop="ticketName"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="handleTicketClick(scope.row)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -773,6 +843,9 @@ export default {
|
|
|
dicts: ['sop_type', 'ticket_status', 'ticket_user_type'],
|
|
|
data() {
|
|
|
return {
|
|
|
+ ticketVisible: false,//正在进行作业票的弹窗标记
|
|
|
+ currentWorkstationId: null,//当前点击的岗位Id
|
|
|
+ currentWorkstationName: null,//当前点击的岗位的名称
|
|
|
jobconfig: null,//接口传递地图与宽高数据
|
|
|
jobconfigPoint: null,//接口传递的岗位位置信息
|
|
|
imageMap: {
|
|
|
@@ -780,7 +853,8 @@ export default {
|
|
|
1: 'ticketType1', //Pm
|
|
|
2: 'ticketType2', //开收班
|
|
|
3: 'ticketType3', //清洁
|
|
|
- 4: 'ticketType4' //换产
|
|
|
+ 4: 'ticketType4', //换产
|
|
|
+ 5: 'ticketType5'//更多
|
|
|
},
|
|
|
tabPosition: 'first',
|
|
|
selectedOption: '',
|
|
|
@@ -854,7 +928,8 @@ export default {
|
|
|
isStepFourExecuted() {
|
|
|
const stepFour = this.EightStepForm.find((step) => step.stepIndex == '4')
|
|
|
return stepFour && stepFour.stepStatus === '1'
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
watch: {
|
|
|
tabPosition: function(val, oldVal) {
|
|
|
@@ -884,6 +959,13 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 正在进行中作业票点击数字打开弹窗
|
|
|
+ handleTicketDialogVisible(entityId, entityName) {
|
|
|
+ this.ticketVisible = true
|
|
|
+ this.currentWorkstationId = entityId
|
|
|
+ this.currentWorkstationName = entityName
|
|
|
+ },
|
|
|
+
|
|
|
// 锁定站信息部分表格收缩
|
|
|
// handleChangeTable() {
|
|
|
// this.tableVisible = !this.tableVisible
|
|
|
@@ -967,6 +1049,7 @@ export default {
|
|
|
},
|
|
|
handleTicketClick(data) {
|
|
|
console.log(data, '查看作业票详情')
|
|
|
+ this.ticketVisible = false
|
|
|
this.ticketId = data.ticketId
|
|
|
this.tabPosition = 'third'
|
|
|
this.workstationId = data.workstationId
|
|
|
@@ -1011,26 +1094,28 @@ export default {
|
|
|
this.TicketListPage = ticketsByWorkstation
|
|
|
|
|
|
})
|
|
|
- const sysAttrKey1 = 'icon.permit.maintenance';//维修
|
|
|
- const sysAttrKey2 = 'icon.permit.pm';//Pm
|
|
|
- const sysAttrKey3 = 'icon.permit.shift';//开收班
|
|
|
- const sysAttrKey4 = 'icon.permit.clean';//清洁
|
|
|
- const sysAttrKey5 = 'icon.permit.changeover';//换产
|
|
|
+ const sysAttrKey1 = 'icon.permit.maintenance'//维修
|
|
|
+ const sysAttrKey2 = 'icon.permit.pm'//Pm
|
|
|
+ const sysAttrKey3 = 'icon.permit.shift'//开收班
|
|
|
+ const sysAttrKey4 = 'icon.permit.clean'//清洁
|
|
|
+ const sysAttrKey5 = 'icon.permit.changeover'//换产
|
|
|
+ const sysAttrKey6 = 'icon.permit.more'//更多
|
|
|
Promise.all([
|
|
|
getIsSystemAttributeByKey(sysAttrKey1),
|
|
|
getIsSystemAttributeByKey(sysAttrKey2),
|
|
|
getIsSystemAttributeByKey(sysAttrKey3),
|
|
|
getIsSystemAttributeByKey(sysAttrKey4),
|
|
|
- getIsSystemAttributeByKey(sysAttrKey5)
|
|
|
+ getIsSystemAttributeByKey(sysAttrKey5),
|
|
|
+ getIsSystemAttributeByKey(sysAttrKey6)
|
|
|
]).then((responses) => {
|
|
|
- this.imageMap[0] = responses[0].data.sysAttrValue; // 维修
|
|
|
- this.imageMap[1] = responses[1].data.sysAttrValue; // Pm
|
|
|
- this.imageMap[2] = responses[2].data.sysAttrValue; // 开收班
|
|
|
- this.imageMap[3] = responses[3].data.sysAttrValue; // 清洁
|
|
|
- this.imageMap[4] = responses[4].data.sysAttrValue; // 换产
|
|
|
-
|
|
|
- console.log(this.imageMap,'imageMap');
|
|
|
- });
|
|
|
+ this.imageMap[0] = responses[0].data.sysAttrValue // 维修
|
|
|
+ this.imageMap[1] = responses[1].data.sysAttrValue // Pm
|
|
|
+ this.imageMap[2] = responses[2].data.sysAttrValue // 开收班
|
|
|
+ this.imageMap[3] = responses[3].data.sysAttrValue // 清洁
|
|
|
+ this.imageMap[4] = responses[4].data.sysAttrValue // 换产
|
|
|
+ this.imageMap[5] = responses[5].data.sysAttrValue//更多
|
|
|
+ console.log(this.imageMap, 'imageMap')
|
|
|
+ })
|
|
|
// 这里注释掉是为了 初始化跳转数据为空
|
|
|
const data1 = {
|
|
|
pages: 1,
|
|
|
@@ -1046,9 +1131,9 @@ export default {
|
|
|
this.marsDeptList = res.data.records
|
|
|
})
|
|
|
// 获取基础数据里配置的作业票地图获取mapId
|
|
|
- const sysAttrKey='sys.map.permit'
|
|
|
+ const sysAttrKey = 'sys.map.permit'
|
|
|
getIsSystemAttributeByKey(sysAttrKey).then((response) => {
|
|
|
- const sysAttrValue=response.data.sysAttrValue;
|
|
|
+ const sysAttrValue = response.data.sysAttrValue
|
|
|
// 这里获取全局配置地图参数里的作业票地图
|
|
|
selectIsMapById(sysAttrValue).then((res) => {
|
|
|
console.log(res, '作业票地图 图片数据')
|
|
|
@@ -1451,8 +1536,11 @@ export default {
|
|
|
console.log(res, '第八步查看作业票数据')
|
|
|
this.AffectedTickets = res.data
|
|
|
})
|
|
|
- }else if(row.stepIndex == '1'){
|
|
|
- this.$router.push({path:'/mes/dv/technology/technologyDetail/CraftDetail',query:{machineryId:this.machineryId}})
|
|
|
+ } else if (row.stepIndex == '1') {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/mes/dv/technology/technologyDetail/CraftDetail',
|
|
|
+ query: { machineryId: this.machineryId }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1471,7 +1559,7 @@ export default {
|
|
|
border-radius: 5px;
|
|
|
color: #fff;
|
|
|
cursor: pointer;
|
|
|
- padding:0 10px;
|
|
|
+ padding: 0 10px;
|
|
|
}
|
|
|
|
|
|
.box-cardStatus {
|