新增的按钮可以固定不要滚到下面去找。增加调令编号的显示、调令被取消的一个提醒、调令的时间上显示编号。增加调令编号、点位、内容=》反馈内容

master
xy 1 year ago
parent c51c293234
commit e091c86c58

@ -6,6 +6,6 @@ ENV='development'
#VUE_APP_UPLOAD_API=http://192.168.60.78:9001/api/admin/upload-file
#VUE_APP_OA_URL=http://192.168.60.18:2021
VUE_APP_BASE_API=http://diaoling-test.ali251.langye.net/
VUE_APP_UPLOAD_API=http://diaoling-test.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API=http://192.168.60.78:8001/
VUE_APP_UPLOAD_API=http://192.168.60.78:8001/api/admin/upload-file
VUE_APP_OA_URL=http://suzhouhedaooa.langye.net

@ -4,7 +4,7 @@ NODE_ENV = production
ENV = 'staging'
# base api
VUE_APP_BASE_API=http://diaoling-test.ali251.langye.net/
VUE_APP_UPLOAD_API=http://diaoling-test.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API=http://192.168.60.78:8001/
VUE_APP_UPLOAD_API=http://192.168.60.78:8001/api/admin/upload-file
VUE_APP_OA_URL=http://suzhouhedaooa.langye.net

@ -74,7 +74,10 @@
<br>
发布时间{{ timeFormat(item.created_at,'YYYY-MM-DD HH:mm') }}
</div>
<div class="list-item__last">预计时长 {{ item.end_time ? ($moment(item.end_time).diff($moment(item.start_time),'hours', true).toFixed(2)) : "-" }}小时</div>
<div class="list-item__last">
序号{{ item.xuhao }}
<br>
预计时长{{ item.end_time ? ($moment(item.end_time).diff($moment(item.start_time),'hours', true).toFixed(2)) : "-" }}小时</div>
<div class="list-item__operate">
<div v-for="(s, si) in (item.tiaozhengleixing === 0 ? closeStatus : status)" :title="operateTitle(item, s)" class="step" @click="stepClick(item,s)">
<div class="step-icon">

@ -57,7 +57,10 @@
<div class="list-item__time">
实际运行时间{{ timeFormat(item.act_start_time) }}{{ timeFormat(item.act_end_time,'HH:mm') }}
</div>
<div class="list-item__last">已用时长 {{ $moment(item.act_end_time).diff($moment(item.act_start_time),'hours', true).toFixed(2) }}小时</div>
<div class="list-item__last">
序号{{ item.xuhao }}
<br>
已用时长{{ $moment(item.act_end_time).diff($moment(item.act_start_time),'hours', true).toFixed(2) }}小时</div>
<div class="list-item__operate">
<div v-for="(s, si) in status" :title="operateTitle(item, s)" class="step">
<div class="step-icon">

@ -77,7 +77,11 @@
<br>
发布时间{{ timeFormat(item.created_at,'YYYY-MM-DD HH:mm') }}
</div>
<div class="list-item__last">预计时长 {{ item.end_time ? $moment(item.end_time).diff($moment(item.start_time),'hours', true).toFixed(2) : '-' }}小时</div>
<div class="list-item__last">
序号{{ item.xuhao }}
<br>
预计时长{{ item.end_time ? $moment(item.end_time).diff($moment(item.start_time),'hours', true).toFixed(2) : '-' }}小时
</div>
<div class="list-item__operate">
<div v-for="(s, si) in progressStatus(item)" :title="operateTitle(item, s)" class="step" @click="stepClick(item,s)">
<div class="step-icon">

@ -268,8 +268,8 @@ export default {
},
{
key: "status",
op: "range",
value: "2,7"
op: "neq",
value: "1"
}
]
})).data
@ -279,14 +279,21 @@ export default {
if (i.status === 2) {
i._isNew = true;
}
if (i.status === 0) {
this.$Notice.warning({
title: '调令被取消',
desc: `取消调令:[${i.equipment_id_equipments_id_relation?.name}]${i.content},计划开始时间${i.start_time}`,
duration: 0
});
}
if (this.transfers1.findIndex(j => j.id === i.id) !== -1) {
this.transfers1.splice(this.transfers1.findIndex(j => j.id === i.id),1,i)
i.status !== 0 ? this.transfers1.splice(this.transfers1.findIndex(j => j.id === i.id),1,i) : this.transfers1.splice(this.transfers1.findIndex(j => j.id === i.id),1)
}
else if (this.transfers2.findIndex(j => j.id === i.id) !== -1) {
this.transfers2.splice(this.transfers2.findIndex(j => j.id === i.id),1,i)
i.status !== 0 ? this.transfers2.splice(this.transfers2.findIndex(j => j.id === i.id),1,i) : this.transfers2.splice(this.transfers2.findIndex(j => j.id === i.id),1)
}
else if (this.transfers3.findIndex(j => j.id === i.id) !== -1) {
this.transfers3.splice(this.transfers3.findIndex(j => j.id === i.id),1,i)
i.status !== 0 ? this.transfers3.splice(this.transfers3.findIndex(j => j.id === i.id),1,i) : this.transfers3.splice(this.transfers3.findIndex(j => j.id === i.id),1)
} else {
if (i.status === 2) {
this.transfers1.unshift(i)

@ -104,7 +104,13 @@
:span-method="objectSpanMethod"
></Table>
<div class="btns">
<div class="btns" ref="btns">
<Button type="primary" @click="submit"></Button>
<Button type="primary" ghost @click="reset"></Button>
<Button type="primary" ghost @click="clone"></Button>
</div>
<div class="btns fixed-btns" :style="{ 'display': isFixedBtns ? 'block' : 'none' }">
<Button type="primary" @click="submit"></Button>
<Button type="primary" ghost @click="reset"></Button>
<Button type="primary" ghost @click="clone"></Button>
@ -124,6 +130,7 @@ export default {
props: {},
data() {
return {
isFixedBtns: true,
isSelectAllType: false,
isSelectAllArea: false,
equipmentInfos: { shuniu: [], waiwei: [], zhazhan: [] },
@ -546,61 +553,6 @@ export default {
}, Array.from({ length: Number(row.equipment.shuibengtaishu || 0)},
(_,i) => this.$createElement("Checkbox",{ props: { label: i } })))
},
{
title: "机组运行状态",
width: 200,
render: (h, { row }) => {
let name = row.equipment.name;
let type = row.equipment.type;
const create = () => {
let dom = [];
let cirs = []
if (/枢纽/g.test(name)) {
const datas = this.equipmentInfos.shuniu.find(i => (name === i.stnm) )?.data[0]
if (datas) {
let values = datas.Value?.split('.')
values.forEach(i => {
cirs.push(Number(i))
})
}
} else {
const datas = this.equipmentInfos.zhazhan.find(i => (name === i.STNMNEW || name === i.STNM) )?.data[0]
if (datas) {
Object.keys(datas).forEach(key => {
if (/PUMP+/.test(key)) {
if (datas[key]) {
cirs.push(Number(datas[key]))
}
}
})
}
}
for (let i = 0; i < cirs.length; i++) {
dom.push(
h("div", {
style: {
width: "14px",
height: "14px",
background: cirs[i] ? "green" : "red",
"border-radius": "100%",
"margin-left": "6px",
},
})
);
}
return dom;
};
return h(
"div",
{
style: {
display: "flex",
},
},
create()
);
},
},
{
title: "类别",
key: "yinpaishui",
@ -1378,7 +1330,14 @@ export default {
deep: true,
},
},
mounted() {},
mounted() {
let _this = this;
document.querySelector(".app-wrapper").onscroll = function () {
let btnsTop = _this.$refs['btns']?.getBoundingClientRect()?.y;
let btnsHeight = _this.$refs['btns']?.getBoundingClientRect()?.height;
_this.isFixedBtns = btnsTop > (window.innerHeight-btnsHeight);
}
},
created() {
this.$bus.$on(
"getDispatches",
@ -1391,6 +1350,7 @@ export default {
this.getDiaolingleixing();
},
destroyed() {
document.querySelector(".app-wrapper").onscroll = null;
this.$bus.$off("getDispatches");
},
};
@ -1435,7 +1395,17 @@ export default {
}
}
.btns {
background: #fff;
margin-top: 10px;
padding-left: 10px;
}
.fixed-btns {
width: 100%;
margin-top: 0;
padding: 10px 40px;
position: fixed;
bottom: 0;
left: 0;
}
</style>

@ -135,6 +135,11 @@ export default {
width: 54,
type: "selection"
},
{
width: 100,
title: "序号",
key: "xuhao"
},
{
title: "范围",
width: 140,

@ -681,33 +681,37 @@ export default {
prop: "transfer_id_transfers_id_relation.content"
})
this.table.unshift({
type: "index",
width: 60,
label: "序号",
type: "transfer_id_transfers_id_relation.xuhao",
width: 100,
label: "调令序号",
});
},
adjustAlignment () {
if (this.firstAdjustTable) {
const data = this.$refs['xyTable'].getListData();
if (data.length === 0) return;
this.form.filter(i => i.list_show).forEach((i) => {
let lengthTemp;
let temp = 0;
while (!lengthTemp || temp < data.length) {
lengthTemp = data[temp][i.field]?.length??0;
temp++;
}
for (let j = 0;j < data.length;j++) {
if (/^-?\d+\.\d+/.test(data[j][i.field])) {
if (data.length < 2) return;
try {
this.form.filter(i => i.list_show).forEach((i) => {
let maxLength = -Infinity;
let minLength = Infinity;
let numberLength = 0;
let temp = 0;
while (temp < data.length) {
maxLength = Math.max(maxLength, data[temp][i.field]?.length??0);
minLength = Math.min(minLength, data[temp][i.field]?.length??0);
numberLength += /^-?[0-9]+(\.[0-9]+)?$/.test(data[temp][i.field]) ? 1 : 0;
temp++;
}
if (numberLength === temp && numberLength !== 0 && i.edit_input !== 'radio') {
this.table.find(a => a.prop === i.field).align = 'right';
return
}
if (Math.abs(lengthTemp - (data[j][i.field]?.length)??0) > 4) {
else if (Math.abs(maxLength - minLength) > 4) {
this.table.find(a => a.prop === i.field).align = 'left';
return
}
}
})
})
} catch (e) {
console.error(e)
}
this.$nextTick(() => {
this.$refs['xyTable'].doLayout();
this.firstAdjustTable = false;

@ -146,7 +146,7 @@
</template>
<template #cancel="{ row }">
<Button
v-if="row.status === 2"
v-if="row.status === 2 || row.status === 3"
size="small"
type="primary"
ghost
@ -724,12 +724,6 @@ export default {
return this.areas.find(i => i.value === val)?.key
}
});
this.table.unshift({
type: "index",
width: 60,
label: "序号",
prop: "index"
});
this.table.unshift({
label: "选择",
prop: "selections",

Loading…
Cancel
Save