|
|
|
|
@ -11,7 +11,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="select-item">
|
|
|
|
|
<div class="select-item__title">功能</div>
|
|
|
|
|
<div class="select-item__title">类型</div>
|
|
|
|
|
<el-checkbox-group size="small" v-model="select.type">
|
|
|
|
|
<el-checkbox-button v-for="item in types" :label="item.value">{{
|
|
|
|
|
item.key
|
|
|
|
|
@ -19,6 +19,15 @@
|
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="select-item">
|
|
|
|
|
<div class="select-item__title">引排水</div>
|
|
|
|
|
<el-radio-group size="small" v-model="ability" @input="radioPick">
|
|
|
|
|
<el-radio-button v-for="item in abilities" :label="item.value">{{
|
|
|
|
|
item.key
|
|
|
|
|
}}</el-radio-button>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="select-item">
|
|
|
|
|
<Button type="primary" style="margin-left: 10px" @click="clear"
|
|
|
|
|
>清空筛选</Button
|
|
|
|
|
@ -30,7 +39,7 @@
|
|
|
|
|
您正在为
|
|
|
|
|
<span style="color: red">{{ date }}</span>
|
|
|
|
|
创建
|
|
|
|
|
<span> {{ "排水" }} </span>
|
|
|
|
|
<span style="color: red;"> {{ abilities.find(i => i.value === ability) ? abilities.find(i => i.value === ability).key : '' }} </span>
|
|
|
|
|
调令
|
|
|
|
|
</p>
|
|
|
|
|
<DatePicker
|
|
|
|
|
@ -103,6 +112,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
areas: [],
|
|
|
|
|
types: [],
|
|
|
|
|
abilities: [],
|
|
|
|
|
select: {
|
|
|
|
|
area: [],
|
|
|
|
|
type: [],
|
|
|
|
|
@ -110,6 +120,7 @@ export default {
|
|
|
|
|
weather: [],
|
|
|
|
|
copyOriginalData: [],
|
|
|
|
|
date: this.$moment().format("YYYY-MM-DD"),
|
|
|
|
|
ability: 1,
|
|
|
|
|
data:
|
|
|
|
|
this.equipmentList?.map((i) => ({
|
|
|
|
|
equipment_id: i.id,
|
|
|
|
|
@ -154,49 +165,40 @@ export default {
|
|
|
|
|
},'新增')
|
|
|
|
|
]);
|
|
|
|
|
},
|
|
|
|
|
// render: (h,{ row, index }) => {
|
|
|
|
|
// return h('div',{
|
|
|
|
|
// style: {
|
|
|
|
|
// display: 'flex',
|
|
|
|
|
// 'justify-content': 'space-between'
|
|
|
|
|
// }
|
|
|
|
|
// },[
|
|
|
|
|
// h('Select',{
|
|
|
|
|
// style: {
|
|
|
|
|
// width: '140px'
|
|
|
|
|
// },
|
|
|
|
|
// props: {
|
|
|
|
|
// value: row.equipment_id,
|
|
|
|
|
// filterable: true,
|
|
|
|
|
// size: 'small',
|
|
|
|
|
// transfer: true,
|
|
|
|
|
// disabled: true
|
|
|
|
|
// },
|
|
|
|
|
// on: {
|
|
|
|
|
// ['on-select']:e => {
|
|
|
|
|
// row.equipment_id = e.value;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// },this.equipments().map(i => {
|
|
|
|
|
// return h('Option',{
|
|
|
|
|
// props: {
|
|
|
|
|
// value: i.id,
|
|
|
|
|
// }
|
|
|
|
|
// },i.name)
|
|
|
|
|
// })),
|
|
|
|
|
// h('Button',{
|
|
|
|
|
// props: {
|
|
|
|
|
// size: 'small',
|
|
|
|
|
// type: 'primary'
|
|
|
|
|
// },
|
|
|
|
|
// on: {
|
|
|
|
|
// ['click']:e => {
|
|
|
|
|
// this.data.splice(index,0,deepCopy(row))
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// },'新增')
|
|
|
|
|
// ])
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '机组运行状态',
|
|
|
|
|
width: 200,
|
|
|
|
|
render: (h) => {
|
|
|
|
|
let num = Math.round(Math.random() * 8)
|
|
|
|
|
const create = () => {
|
|
|
|
|
let dom = [];
|
|
|
|
|
for (let i = 0;i<=num;i++) {
|
|
|
|
|
dom.push(h('div',{
|
|
|
|
|
style: {
|
|
|
|
|
width: '14px',
|
|
|
|
|
height: '14px',
|
|
|
|
|
background: i === num-1 ? 'red' : 'green',
|
|
|
|
|
'border-radius': '100%',
|
|
|
|
|
'margin-left': '6px'
|
|
|
|
|
}
|
|
|
|
|
}))
|
|
|
|
|
}
|
|
|
|
|
return dom;
|
|
|
|
|
}
|
|
|
|
|
return h('div',{
|
|
|
|
|
style: {
|
|
|
|
|
display: 'flex'
|
|
|
|
|
}
|
|
|
|
|
},create())
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '引排水',
|
|
|
|
|
key: 'yinpaishui',
|
|
|
|
|
width: 100,
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: (h,{ row }) => (h('span',this.abilities.find(i => i.value === row.yinpaishui)?.key))
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "开启时间",
|
|
|
|
|
@ -333,10 +335,14 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
radioPick (e) {
|
|
|
|
|
this.data.forEach(i => (i.yinpaishui = e))
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
clear () {
|
|
|
|
|
this.select = {
|
|
|
|
|
area: [],
|
|
|
|
|
type: [],
|
|
|
|
|
type: []
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -356,6 +362,7 @@ export default {
|
|
|
|
|
end_time: "",
|
|
|
|
|
content: "",
|
|
|
|
|
level: 1,
|
|
|
|
|
yinpaishui: this.ability
|
|
|
|
|
})) || [];
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -399,6 +406,7 @@ export default {
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: `成功创建${res.length}条调令`
|
|
|
|
|
})
|
|
|
|
|
this.$bus.$emit('createdTransfer')
|
|
|
|
|
}).catch(_ => {
|
|
|
|
|
loadingInstance.close();
|
|
|
|
|
})
|
|
|
|
|
@ -432,6 +440,21 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getAbility () {
|
|
|
|
|
const obj = (await show({ id: 29 }, false))?.select_item;
|
|
|
|
|
if (obj && typeof obj === "object") {
|
|
|
|
|
let keys = Object.keys(obj);
|
|
|
|
|
if (keys.length > 0) {
|
|
|
|
|
this.abilities = keys.map((key) => {
|
|
|
|
|
return {
|
|
|
|
|
key,
|
|
|
|
|
value: /^\d*$/.test(obj[key]) ? Number(obj[key]) : obj[key],
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.$bus.$emit('yinpaishui',this.abilities)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
mergeData() {
|
|
|
|
|
@ -458,6 +481,7 @@ export default {
|
|
|
|
|
end_time: "",
|
|
|
|
|
content: "",
|
|
|
|
|
level: 1,
|
|
|
|
|
yinpaishui: this.ability
|
|
|
|
|
})) || [];
|
|
|
|
|
},
|
|
|
|
|
select: {
|
|
|
|
|
@ -466,10 +490,10 @@ export default {
|
|
|
|
|
let list1 = [];
|
|
|
|
|
let list2 = [];
|
|
|
|
|
if (val.area.length > 0) {
|
|
|
|
|
list1 = this.equipments().filter(i => val.area.find(j => j === i.id))
|
|
|
|
|
list1 = this.equipments().filter(i => val.area.find(j => j.key === i.area))
|
|
|
|
|
}
|
|
|
|
|
if (val.type.length > 0) {
|
|
|
|
|
list2 = this.equipments().filter(i => val.type.find(j => j === i.id))
|
|
|
|
|
list2 = this.equipments().filter(i => val.type.find(j => j.key === i.type))
|
|
|
|
|
}
|
|
|
|
|
this.data = Array.from(new Set([...list1,...list2].map(JSON.stringify))).map(JSON.parse).map((i) => ({
|
|
|
|
|
equipment_id: i.id,
|
|
|
|
|
@ -477,6 +501,7 @@ export default {
|
|
|
|
|
end_time: "",
|
|
|
|
|
content: "",
|
|
|
|
|
level: 1,
|
|
|
|
|
yinpaishui: this.ability
|
|
|
|
|
})) || [];
|
|
|
|
|
} else {
|
|
|
|
|
this.data = this.equipments()?.map((i) => ({
|
|
|
|
|
@ -485,7 +510,8 @@ export default {
|
|
|
|
|
end_time: "",
|
|
|
|
|
content: "",
|
|
|
|
|
level: 1,
|
|
|
|
|
})) || [];;
|
|
|
|
|
yinpaishui: this.ability
|
|
|
|
|
})) || [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
deep: true
|
|
|
|
|
@ -495,6 +521,7 @@ export default {
|
|
|
|
|
created() {
|
|
|
|
|
this.getArea();
|
|
|
|
|
this.getType();
|
|
|
|
|
this.getAbility();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|