Compare commits

..

No commits in common. "b76b8f4fe9ca201c29a032025ad6d52abb400c95" and "a7b4e72bc2e7bdaf5a236f66fd5ff0b55c3b3451" have entirely different histories.

2 changed files with 54 additions and 43 deletions

View File

@ -162,54 +162,50 @@ export default {
buildProps(nameData) { buildProps(nameData) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { const dateArr = Array.from(
const dateArr = Array.from( new Set(
new Set( nameData
nameData .map((item) => (item.tree == 1 ? item.name : undefined))
.map((item) => (item.tree == 1 ? item.name : undefined)) .filter((v) => v)
.filter((v) => v) )
) );
); //
// dateArr.sort().forEach((date) => {
dateArr.sort().forEach((date) => { this.tableProps.push({
this.tableProps.push({ label: date,
label: date, align: 'center',
align: 'center', children: [
children: [ {
{ prop: date + '_eq_ct',
prop: date + '_eq_ct', label: '设备CT',
label: '设备CT', align: 'center',
align: 'center', },
}, {
{ prop: date + '_eq_tt',
prop: date + '_eq_tt', label: '设备TT',
label: '设备TT', align: 'center',
align: 'center', },
}, {
{ prop: date + '_pl_ct',
prop: date + '_pl_ct', label: '产线CT',
label: '产线CT', align: 'center',
align: 'center', },
}, {
{ prop: date + '_pl_tt',
prop: date + '_pl_tt', label: '产线TT',
label: '产线TT', align: 'center',
align: 'center', },
}, ],
],
});
}); });
});
resolve(); resolve();
} catch (err) {
reject(err);
}
}); });
}, },
async buildTableData(data) { async buildTableData(data) {
/** 处理 工段 分组 */ /** 处理 工段 分组 */
const sectionList = data.map((item) => {}); const sectionList = data.map(item => {})
}, },
setRowSpan(arr) { setRowSpan(arr) {

View File

@ -59,9 +59,14 @@
<script> <script>
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
<<<<<<< HEAD
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
=======
import AddOrUpdate from './AddOrUpdate.vue'; import AddOrUpdate from './AddOrUpdate.vue';
import moment from 'moment'; import moment from 'moment';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
>>>>>>> projects/mes-test
const btn = { const btn = {
name: 'tableBtn', name: 'tableBtn',
@ -92,9 +97,13 @@ export default {
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
<<<<<<< HEAD
searchBarKeys: ['equipmentName', 'createTime'],
=======
readOnly: false, readOnly: false,
chosedLogId: false, chosedLogId: false,
searchBarKeys: ['equipmentName', 'recordTime'], searchBarKeys: ['equipmentName', 'recordTime'],
>>>>>>> projects/mes-test
tableBtn: [ tableBtn: [
// this.$auth.hasPermi('equipment:spare-parts-config:update') // this.$auth.hasPermi('equipment:spare-parts-config:update')
// ? { // ? {
@ -119,6 +128,11 @@ export default {
{ prop: 'productionLine', label: '产线' }, { prop: 'productionLine', label: '产线' },
{ prop: 'workshopSection', label: '工段' }, { prop: 'workshopSection', label: '工段' },
{ prop: 'equipment', label: '设备名称' }, { prop: 'equipment', label: '设备名称' },
<<<<<<< HEAD
{ prop: 'alarmGrade', label: '报警级别', filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL) },
{ prop: 'createTime', label: '报警时间',filter: timeFilter }, //
{ prop: 'responsible1', label: '设备报警码' }, //
=======
{ {
prop: 'alarmGrade', prop: 'alarmGrade',
label: '报警级别', label: '报警级别',
@ -126,6 +140,7 @@ export default {
}, },
{ prop: 'createTime', label: '报警时间', filter: timeFilter }, // { prop: 'createTime', label: '报警时间', filter: timeFilter }, //
{ prop: 'alarmCode', label: '设备报警码' }, // { prop: 'alarmCode', label: '设备报警码' }, //
>>>>>>> projects/mes-test
{ prop: 'alarmContent', label: '报警内容' }, { prop: 'alarmContent', label: '报警内容' },
{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn }, { prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn }, // TODO: { prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn }, // TODO:
@ -151,7 +166,7 @@ export default {
startPlaceholder: '开始日期', startPlaceholder: '开始日期',
endPlaceholder: '结束日期', endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'], defaultTime: ['00:00:00', '23:59:59'],
param: 'createTime', param: 'createTime',
// defaultSelect: [ // defaultSelect: [
// new Date(y, m, d) // new Date(y, m, d)
// .toLocaleString() // .toLocaleString()
@ -206,7 +221,7 @@ export default {
pageSize: 10, pageSize: 10,
lineId: null, lineId: null,
equipmentId: null, equipmentId: null,
recordTime: [], recordTime: []
}, },
basePath: '/base/equipment-alarm-log', basePath: '/base/equipment-alarm-log',
list: [], list: [],