Compare commits

...

2 Commits

  1. 35
      src/main.js
  2. 13
      src/styles/element-ui.scss
  3. 29
      src/views/smart/workorder.vue
  4. 10
      src/views/smart/workorderDetail.vue

@ -54,4 +54,39 @@ let vue = new Vue({
render: h => h(App)
}).$mount('#app')
// const style = document.createElement('style');
// style.type = 'text/css';
// style.innerHTML = `
// .el-tooltip__popper {
// max-width: 300px;
// word-wrap: break-word;
// color: white;
// background: #00000069;
// }
// `;
// document.head.appendChild(style);
document.addEventListener('mouseover', function(event) {
const target = event.target;
if (target && target.classList.contains('cell')) {
if (target.scrollWidth > target.clientWidth) {
const tooltip = document.createElement('div');
tooltip.className = 'el-tooltip__popper';
tooltip.style.position = 'absolute';
tooltip.style.zIndex = 9999;
tooltip.innerText = target.innerText;
document.body.appendChild(tooltip);
const rect = target.getBoundingClientRect();
tooltip.style.top = `${rect.top - tooltip.offsetHeight}px`;
tooltip.style.left = `${rect.left + (rect.width - tooltip.offsetWidth) / 2}px`;
target.addEventListener('mouseleave', function() {
document.body.removeChild(tooltip);
}, { once: true });
}
}
});
export default vue;

@ -95,3 +95,16 @@ table {
overflow: hidden;
text-overflow: ellipsis;
}
.el-tooltip__popper {
max-width: 300px;
word-wrap: break-word;
color: white;
background: #00000069;
}
.el-tooltip__popper {
max-width: 350px;
word-wrap: break-word;
color: white;
background: rgba(0, 0, 0, 0.69);
}

@ -26,16 +26,16 @@
<template #equipmentLedgerId="scope">
{{scope.row.kksEncoding}}
</template>
<template #description="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.description" placement="top-start">
<span>{{ scope.row.description }}</span>
</el-tooltip>
</template>
<template #maintenanceTaskType="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.maintenanceTaskType" placement="top-start">
<span>{{ scope.row.maintenanceTaskType }}</span>
</el-tooltip>
</template>
<!-- <template #description="scope">-->
<!-- <el-tooltip class="item" effect="dark" :content="scope.row.description" placement="top-start">-->
<!-- <span>{{ scope.row.description }}</span>-->
<!-- </el-tooltip>-->
<!-- </template>-->
<!-- <template #maintenanceTaskType="scope">-->
<!-- <el-tooltip class="item" effect="dark" :content="scope.row.maintenanceTaskType" placement="top-start">-->
<!-- <span>{{ scope.row.maintenanceTaskType }}</span>-->
<!-- </el-tooltip>-->
<!-- </template>-->
<template slot="menuRight">
<el-button type="primary" size="small" plain @click="handleDetailAdd" v-if="permission.workorder_add">新增</el-button>
<el-button type="primary" size="small" plain @click="handleReject" v-if="permission.workorder_reject">批量驳回</el-button>
@ -332,9 +332,16 @@
}]
},
{
label: "工单完成",
label: "处理结果",
prop: "handlingResult",
width: "150px",
type: "select",
span: 8,
dicUrl: "/api/daf-system/dict/dictionary?code=workorder_process_res",
props: {
label: "dictValue",
value: "dictKey"
},
},
{
label: "审核状态",

@ -283,11 +283,13 @@
}, {
label: "处理结果",
prop: "handlingResult",
type: 'textarea',
minRows: 1,
maxRows: 3,
type: "select",
span: 8,
maxlength: 400
dicUrl: "/api/daf-system/dict/dictionary?code=workorder_process_res",
props: {
label: "dictValue",
value: "dictKey"
},
},
]

Loading…
Cancel
Save