调令调整

master
xy 2 years ago
parent e32ece8ee5
commit 5c1013b7bb

@ -32,6 +32,13 @@ export function weather (params) {
})
}
export function infoStatics() {
return request({
url: "/api/admin/other/statistic",
method: "get",
isLoading: false
})
}
export function info (data) {
return request({
url: "/api/admin/other/get-daily-details-by-date",

@ -372,15 +372,15 @@ export default {
},
methods: {
//
async setPTransferStatus () {
async setPTransferStatus (resetStatus) {
if (this.data.is_adjust &&
this.data.to_transfer_id &&
this.data.to_transfer_id_transfers_id_relation &&
++this.data.status > this.data.to_transfer_id_transfers_id_relation.status) {
resetStatus > this.data.to_transfer_id_transfers_id_relation.status) {
await save({
id: this.data.to_transfer_id,
table_name: "transfers",
status: ++this.data.status
status: resetStatus
},false)
}
@ -433,7 +433,7 @@ export default {
}
).then((res) => {
let copyData = deepCopy(this.data);
copyData.status = this.data.status === 3 ? 4 : 6;
copyData.status = (this.data.status === 3 || this.data.tiaozhengleixing === 0) ? 4 : 6;
this.data.status === 3 ? (copyData.notice_open_time = this.$moment().format('YYYY-MM-DD HH:mm')) : (copyData.notice_close_time = this.$moment().format('YYYY-MM-DD HH:mm:ss'))
for (let key in copyData) {
if (/_relation/g.test(key)) {
@ -447,7 +447,7 @@ export default {
},
false
).then((_) => {
this.setPTransferStatus().then(_ => {
this.setPTransferStatus(copyData.status).then(_ => {
this.$emit("refresh");
this.$emit('start');
})
@ -539,7 +539,7 @@ export default {
table_name: "transfers",
...copyData,
},false).then((_) => {
this.setPTransferStatus().then(_ => {
this.setPTransferStatus(copyData.status).then(_ => {
this.$emit("refresh");
this.$emit('start');
})
@ -578,7 +578,7 @@ export default {
table_name: "transfers",
...copyData,
},false).then((_) => {
this.setPTransferStatus().then(_ => {
this.setPTransferStatus(copyData.status).then(_ => {
this.$emit("refresh");
this.$emit('start');
})

@ -46,7 +46,7 @@
<div class="list-item__status-2"></div>
<p>存在调整中指令</p>
</template>
<template v-if="item.is_adjust">
<template v-if="item.is_adjust===1">
<span style="color: #d15d52;">调整</span>
</template>
</div>

@ -46,7 +46,7 @@
<div class="list-item__status-2"></div>
<p>存在调整中指令</p>
</template>
<template v-if="item.is_adjust">
<template v-if="item.is_adjust===1">
<span style="color: #d15d52;">调整</span>
</template>
</div>
@ -68,7 +68,7 @@
</div>
<div class="list-item__last">预计时长 {{ $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 v-for="(s, si) in progressStatus(item)" :title="operateTitle(item, s)" class="step" @click="stepClick(item,s)">
<div class="step-icon">
<div class="step-icon__cir" :class="`step-icon__cir-${stepFormat(item.status,s.value)}`"></div>
<div class="step-icon__line" :class="`step-icon__line-${stepFormat(item.status,s.value)}`" v-if="si < (item.tiaozhengleixing === 0 ? closeStatus : status).length-1"></div>
@ -96,23 +96,6 @@ export default {
inject: ["transfers", "nowTime", "auths"],
data() {
return {
closeStatus: [
{
value: 2,
label: "接收",
auth: "receive"
},
{
value: 3,
label: "确认关闭通知",
auth: "noticeClose"
},
{
value: 6,
label: "确认关闭",
auth: "close"
},
],
status: [
{
value: 2,
@ -212,6 +195,70 @@ export default {
}
},
progressStatus () {
return function (item) {
if (item.tiaozhengleixing === 0) {
return [
{
value: 2,
label: "接收",
auth: "receive"
},
{
value: 3,
label: "确认关闭通知",
auth: "noticeClose"
},
{
value: 4,
label: "确认关闭",
auth: "close"
},
];
} else if (item.tiaozhengleixing === 1) {
if (item.equipment_id_equipments_id_relation.type === 1) {
return [
{
value: 2,
label: "接收",
auth: "receive"
},
{
value: 3,
label: "通知增开",
auth: "noticeOpen"
},
{
value: 4,
label: "开启",
auth: "open"
},
]
} else {
return [
{
value: 2,
label: "接收",
auth: "receive"
},
{
value: 3,
label: "通知调整开度",
auth: "noticeOpen"
},
{
value: 4,
label: "调整开度",
auth: "open"
},
]
}
} else {
return this.status;
}
}
},
timeStatusFormat () {
return function (item) {
//1 2 3 4

@ -151,11 +151,11 @@ export default {
},
submit() {
const leixingLabel = this.types.find(i => i.id === this.form.tiaozhengleixing)?.value
if (leixingLabel === '关闭') {
this.form.kaiqishuliang = this.originalData.kaiqishuliang
} else if (leixingLabel === '增开') {
this.form.kaiqishuliang = Number(this.detail?.kaiqishuliang) + this.form.kaiqishuliang
const leixingLabel = this.types.find(i => i.id === this.form.tiaozhengleixing)?.id
if (leixingLabel === 0) {
this.form.kaiqishuliang = Number(this.detail?.kaiqishuliang) - Number(this.form.kaiqishuliang)
} else if (leixingLabel === 1) {
this.form.kaiqishuliang = Number(this.detail?.kaiqishuliang) + Number(this.form.kaiqishuliang)
} else {
}
let updateData = JSON.stringify(this.form);
@ -219,7 +219,7 @@ export default {
return this.areas.find(i => i.value === this.detail.equipment_id_equipments_id_relation?.area)?.key || "";
},
myleibie () {
return this.abilities.find(i => i.value === this.detail.equipment_id_equipments_id_relation?.leibie)?.key || "";
return this.abilities.find(i => i.value === this.detail?.leibie)?.key || "";
},
openNumberMax () {
@ -236,6 +236,7 @@ export default {
},
types () {
let temp = this.equipmentType;
if (this.equipmentType === 1) {
return [
{

@ -1051,7 +1051,8 @@ export default {
{
table_name: "transfers",
...i,
shifouzouliucheng: isNeed
shifouzouliucheng: isNeed,
is_adjust: -1
},
false
)

@ -12,21 +12,22 @@
<div class="title">动态</div>
<template>
<div class="weather-container">
<Card class="weather-container__card" :class="'card'+(index+1)" v-for="(item,key,index) in weatherKv" :style="{ 'background': item.color || '#fff','color': '#fff','border-radius': '14px' }">
<template #title>
<div style="display: flex;align-items: center;">
<div style="padding: 0 14px 0 10px;" v-html="item.icon"></div>
<span style="font-weight: 600;font-size: 17px;">{{ item.label }}</span>
</div>
</template>
<template>
<template>
<div class="text" v-html="key === 'weather' ? weather[key] : splitSpan(weather ? weather[key] : '')"></div>
</template>
</template>
</Card>
</div>
<weatherCpn></weatherCpn>
<!-- <div class="weather-container">-->
<!-- <Card class="weather-container__card" :class="'card'+(index+1)" v-for="(item,key,index) in weatherKv" :style="{ 'background': item.color || '#fff','color': '#fff','border-radius': '14px' }">-->
<!-- <template #title>-->
<!-- <div style="display: flex;align-items: center;">-->
<!-- <div style="padding: 0 14px 0 10px;" v-html="item.icon"></div>-->
<!-- <span style="font-weight: 600;font-size: 17px;">{{ item.label }}</span>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template>-->
<!-- <template>-->
<!-- <div class="text" v-html="key === 'weather' ? weather[key] : splitSpan(weather ? weather[key] : '')"></div>-->
<!-- </template>-->
<!-- </template>-->
<!-- </Card>-->
<!-- </div>-->
</template>
</div>
@ -69,6 +70,7 @@ import LxHeader from "@/components/LxHeader/index.vue";
// import step1 from "@/views/order/component/step1.vue";
// import step2 from "@/views/order/component/step2.vue";
// import step3 from "@/views/order/component/step3.vue";
import weatherCpn from "@/views/order/component/weather.vue";
import createDispatch from "@/views/order/component/createDispatch.vue";
import dispatchList from "@/views/order/component/dispatchList.vue";
import axios from "axios";
@ -76,7 +78,8 @@ export default {
components: {
LxHeader,
createDispatch,
dispatchList
dispatchList,
weatherCpn
},
data() {
return {

@ -0,0 +1,85 @@
<template>
<div class="container">
<el-row :gutter="20">
<el-col :span="12">
<el-card>
<template #header>
实时水位
</template>
</el-card>
<el-card style="margin-top: 10px;">
<template #header>
当日累计雨量毫米
</template>
</el-card>
</el-col>
<el-col :span="12">
<el-card>
<template #header>
闸门开度/堰闸顶高
</template>
</el-card>
<el-card style="margin-top: 10px;">
<template #header>
机组实时状态
</template>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import { info, weather, infoStatics } from "@/api/other";
import { index, save } from "@/api/system/baseForm";
export default {
data() {
return {
weather: {},
}
},
methods: {
async getWeatherInfo () {
let infoObj = {
weather: '',
water: '',
rain: '',
prevent: '',
early_warning: ''
}
const weatherInfo = await weather()
infoObj.weather = `${weatherInfo.weather},${weatherInfo.wD}${weatherInfo.wS},${weatherInfo.sendibleTemp}-${weatherInfo.temp}°C`
const info = await infoStatics()
console.log(info)
},
async getWeather () {
const res = (await index({
table_name: 'waters',
filter: [
{
key: 'date',
op: 'eq',
value: this.$moment().format('YYYY-MM-DD')
}
]
},false)).data[0]
if (!res) {
await this.getWeatherInfo()
} else {
this.weather = res
}
}
},
computed: {},
created() {
//this.getWeather()
this.getWeatherInfo()
}
}
</script>
<style scoped lang="scss">
</style>

@ -102,16 +102,18 @@
"
>
<template #adjust="{ row }">
<Button
size="small"
type="primary"
@click="
<template v-if="[2,3,4,5,6].find(i => i === row.status)">
<Button
size="small"
type="primary"
@click="
$refs['adjust'].setId(row.id),
$refs['adjust'].setType('editor'),
$refs['adjust'].show()
"
>调整</Button
>
>调整</Button
>
</template>
</template>
<template #callback="{ row }">
<Button
@ -256,6 +258,11 @@ export default {
op: "in",
value: []
},
{
key: "is_adjust",
op: "eq",
value: -1
}
],
sort_name: 'start_time',
page_size: 9999,
@ -311,11 +318,6 @@ export default {
return false
}
}
if ([7].find(i => i.status)) {
if (item === 'adjust') {
return false
}
}
return true
},

@ -429,6 +429,11 @@ export default {
key: "status",
op: "eq",
value: 7
},
{
key: "is_adjust",
op: "eq",
value: -1
}
],
sort_name: 'start_time',

Loading…
Cancel
Save