|
|
|
|
@ -47,7 +47,24 @@
|
|
|
|
|
>导出</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<Button type="primary" @click="cloneTransfer">克隆调令</Button>
|
|
|
|
|
<Button type="primary" @click="showClone">克隆调令</Button>
|
|
|
|
|
<el-popover
|
|
|
|
|
placement="bottom"
|
|
|
|
|
title="点位"
|
|
|
|
|
width="400"
|
|
|
|
|
trigger="click">
|
|
|
|
|
<Button style="margin-left: 10px;" slot="reference" type="primary">点位筛选</Button>
|
|
|
|
|
<template>
|
|
|
|
|
<el-tree :data="equipments"
|
|
|
|
|
node-key="id"
|
|
|
|
|
:style="{ 'max-height': treeHeight, 'overflow': 'scroll' }"
|
|
|
|
|
ref="elTree"
|
|
|
|
|
:props="{ children: 'children', label: 'name' }"
|
|
|
|
|
show-checkbox
|
|
|
|
|
@check="handleCheckChange">
|
|
|
|
|
</el-tree>
|
|
|
|
|
</template>
|
|
|
|
|
</el-popover>
|
|
|
|
|
<template #distribute>
|
|
|
|
|
<Button type="primary" @click="pickNoDistribute">勾选当日未下发</Button>
|
|
|
|
|
<Button type="primary" @click="distributeTransfers">批量下发</Button>
|
|
|
|
|
@ -57,107 +74,192 @@
|
|
|
|
|
</LxHeader>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!--$refs['drawer'].setId(row.id);
|
|
|
|
|
$refs['drawer'].show();-->
|
|
|
|
|
<el-row :gutter="10">
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-tree :data="equipments"
|
|
|
|
|
node-key="id"
|
|
|
|
|
:style="{ 'max-height': treeHeight, 'overflow': 'scroll' }"
|
|
|
|
|
ref="elTree"
|
|
|
|
|
:props="{ children: 'children', label: 'name' }"
|
|
|
|
|
show-checkbox
|
|
|
|
|
@check="handleCheckChange">
|
|
|
|
|
</el-tree>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<xy-table
|
|
|
|
|
:btnCondition="btnCondition"
|
|
|
|
|
:span-method="objectSpanMethod"
|
|
|
|
|
:format-list-data="mergeData"
|
|
|
|
|
:is-page="false"
|
|
|
|
|
:btn-width="360"
|
|
|
|
|
:auths="auths_auth_mixin"
|
|
|
|
|
:delay-req="true"
|
|
|
|
|
:destroy-action="destroy"
|
|
|
|
|
ref="xyTable"
|
|
|
|
|
:border="true"
|
|
|
|
|
:row-key="row => row.id"
|
|
|
|
|
:action="index"
|
|
|
|
|
:req-opt="tableSelect"
|
|
|
|
|
:destroy-req-opt="select"
|
|
|
|
|
:table-item="table"
|
|
|
|
|
@detail="
|
|
|
|
|
<xy-table
|
|
|
|
|
:btnCondition="btnCondition"
|
|
|
|
|
:span-method="objectSpanMethod"
|
|
|
|
|
:format-list-data="mergeData"
|
|
|
|
|
:is-page="false"
|
|
|
|
|
:btn-width="360"
|
|
|
|
|
:auths="auths_auth_mixin"
|
|
|
|
|
:delay-req="true"
|
|
|
|
|
:destroy-action="destroy"
|
|
|
|
|
ref="xyTable"
|
|
|
|
|
:border="true"
|
|
|
|
|
:row-key="row => row.id"
|
|
|
|
|
:action="index"
|
|
|
|
|
:req-opt="tableSelect"
|
|
|
|
|
:destroy-req-opt="select"
|
|
|
|
|
:table-item="table"
|
|
|
|
|
@detail="
|
|
|
|
|
(row) => {
|
|
|
|
|
$router.push({
|
|
|
|
|
path: $route.path + '/detail/' + row.id,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
@editor="
|
|
|
|
|
@editor="
|
|
|
|
|
(row) => {
|
|
|
|
|
$refs['dialog'].setId(row.id);
|
|
|
|
|
$refs['dialog'].setType('editor');
|
|
|
|
|
$refs['dialog'].show();
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<template #adjust="{ row }">
|
|
|
|
|
<template v-if="[2,3,4,5,6].find(i => i === row.status)">
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
>
|
|
|
|
|
<template #adjust="{ row }">
|
|
|
|
|
<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
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<template #callback="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
>调整</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<template #callback="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
$refs['callback'].setId(row.id),
|
|
|
|
|
$refs['callback'].setType('add'),
|
|
|
|
|
$refs['callback'].show()
|
|
|
|
|
"
|
|
|
|
|
>反馈</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #oa="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="toOa(row)"
|
|
|
|
|
>发起流程</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #distribute="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
v-if="row.status === 1 || row.status === 0"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="setTransferStatus(2,row)"
|
|
|
|
|
>下发</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #cancel="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
v-if="row.status === 2 || row.status === 3"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
ghost
|
|
|
|
|
@click="setTransferStatus(0,row)"
|
|
|
|
|
>取消</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
>反馈</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #oa="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="toOa(row)"
|
|
|
|
|
>发起流程</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #distribute="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
v-if="row.status === 1 || row.status === 0"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="setTransferStatus(2,row)"
|
|
|
|
|
>下发</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #cancel="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
v-if="row.status === 2 || row.status === 3"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
ghost
|
|
|
|
|
@click="setTransferStatus(0,row)"
|
|
|
|
|
>取消</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
<!--$refs['drawer'].setId(row.id);
|
|
|
|
|
$refs['drawer'].show();-->
|
|
|
|
|
<!-- <el-row :gutter="10">-->
|
|
|
|
|
<!-- <el-col :span="4">-->
|
|
|
|
|
<!-- <el-tree :data="equipments"-->
|
|
|
|
|
<!-- node-key="id"-->
|
|
|
|
|
<!-- :style="{ 'max-height': treeHeight, 'overflow': 'scroll' }"-->
|
|
|
|
|
<!-- ref="elTree"-->
|
|
|
|
|
<!-- :props="{ children: 'children', label: 'name' }"-->
|
|
|
|
|
<!-- show-checkbox-->
|
|
|
|
|
<!-- @check="handleCheckChange">-->
|
|
|
|
|
<!-- </el-tree>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="20">-->
|
|
|
|
|
<!-- <xy-table-->
|
|
|
|
|
<!-- :btnCondition="btnCondition"-->
|
|
|
|
|
<!-- :span-method="objectSpanMethod"-->
|
|
|
|
|
<!-- :format-list-data="mergeData"-->
|
|
|
|
|
<!-- :is-page="false"-->
|
|
|
|
|
<!-- :btn-width="360"-->
|
|
|
|
|
<!-- :auths="auths_auth_mixin"-->
|
|
|
|
|
<!-- :delay-req="true"-->
|
|
|
|
|
<!-- :destroy-action="destroy"-->
|
|
|
|
|
<!-- ref="xyTable"-->
|
|
|
|
|
<!-- :border="true"-->
|
|
|
|
|
<!-- :row-key="row => row.id"-->
|
|
|
|
|
<!-- :action="index"-->
|
|
|
|
|
<!-- :req-opt="tableSelect"-->
|
|
|
|
|
<!-- :destroy-req-opt="select"-->
|
|
|
|
|
<!-- :table-item="table"-->
|
|
|
|
|
<!-- @detail="-->
|
|
|
|
|
<!-- (row) => {-->
|
|
|
|
|
<!-- $router.push({-->
|
|
|
|
|
<!-- path: $route.path + '/detail/' + row.id,-->
|
|
|
|
|
<!-- });-->
|
|
|
|
|
<!-- }-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- @editor="-->
|
|
|
|
|
<!-- (row) => {-->
|
|
|
|
|
<!-- $refs['dialog'].setId(row.id);-->
|
|
|
|
|
<!-- $refs['dialog'].setType('editor');-->
|
|
|
|
|
<!-- $refs['dialog'].show();-->
|
|
|
|
|
<!-- }-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <template #adjust="{ row }">-->
|
|
|
|
|
<!-- <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-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- <template #callback="{ row }">-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="-->
|
|
|
|
|
<!-- $refs['callback'].setId(row.id),-->
|
|
|
|
|
<!-- $refs['callback'].setType('add'),-->
|
|
|
|
|
<!-- $refs['callback'].show()-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >反馈</Button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- <template #oa="{ row }">-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="toOa(row)"-->
|
|
|
|
|
<!-- >发起流程</Button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- <template #distribute="{ row }">-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- v-if="row.status === 1 || row.status === 0"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="setTransferStatus(2,row)"-->
|
|
|
|
|
<!-- >下发</Button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- <template #cancel="{ row }">-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- v-if="row.status === 2 || row.status === 3"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- ghost-->
|
|
|
|
|
<!-- @click="setTransferStatus(0,row)"-->
|
|
|
|
|
<!-- >取消</Button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </xy-table>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
|
|
|
|
|
<!-- <dialoger-->
|
|
|
|
|
<!-- :table-name="customForm.tableName"-->
|
|
|
|
|
@ -179,6 +281,24 @@
|
|
|
|
|
></imports>
|
|
|
|
|
<callback ref="callback"></callback>
|
|
|
|
|
<adjust :areas="areas" :abilities="abilities" ref="adjust" @refresh="$refs['xyTable'].getTableData()"></adjust>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="克隆调令" width="78%" :visible.sync="dialogVisible">
|
|
|
|
|
<div>
|
|
|
|
|
<xy-table
|
|
|
|
|
:list="clones"
|
|
|
|
|
:is-page="false"
|
|
|
|
|
ref="xyTable"
|
|
|
|
|
:height="490"
|
|
|
|
|
:border="true"
|
|
|
|
|
:table-item="cloneTable"
|
|
|
|
|
>
|
|
|
|
|
</xy-table>
|
|
|
|
|
</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="cloneTransfer">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -223,6 +343,61 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
clones: [],
|
|
|
|
|
cloneTable: [
|
|
|
|
|
{
|
|
|
|
|
label: '范围',
|
|
|
|
|
prop: 'equipment_area',
|
|
|
|
|
width: 140,
|
|
|
|
|
formatter:(data,row,val) => {
|
|
|
|
|
return this.areas.find(i => i.value === val)?.key
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '点位',
|
|
|
|
|
prop: 'equipment_name',
|
|
|
|
|
width: 140
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '调令类型',
|
|
|
|
|
prop: 'diaolingleixing',
|
|
|
|
|
width: 140,
|
|
|
|
|
customFn: row => this.table?.find(i => i.prop === 'diaolingleixing')?.customFn(row)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '闸门开启数量',
|
|
|
|
|
prop: 'kaiqishuliang',
|
|
|
|
|
width: 100
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '水泵开启数量',
|
|
|
|
|
prop: 'kaiqishuliang1',
|
|
|
|
|
width: 100
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '类别',
|
|
|
|
|
prop: 'leibie',
|
|
|
|
|
width: 100,
|
|
|
|
|
customFn: row => this.table?.find(i => i.prop === 'leibie')?.customFn(row)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '开始时间',
|
|
|
|
|
prop: 'start_time',
|
|
|
|
|
width: 100
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '结束时间',
|
|
|
|
|
prop: 'end_time',
|
|
|
|
|
width: 100
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '内容',
|
|
|
|
|
prop: 'content',
|
|
|
|
|
minWidth: 140
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
equipments: [],
|
|
|
|
|
areas: [],
|
|
|
|
|
abilities: [],
|
|
|
|
|
@ -434,21 +609,28 @@ export default {
|
|
|
|
|
this.$refs['xyTable'].getTableData()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
showClone() {
|
|
|
|
|
this.clones = this.$refs['xyTable'].getSelection().map(i => ({
|
|
|
|
|
equipment_area: i.equipment_id_equipments_id_relation?.area,
|
|
|
|
|
equipment_name: i.equipment_id_equipments_id_relation?.name,
|
|
|
|
|
equipment_id: i.equipment_id,
|
|
|
|
|
start_time: this.$moment(i.start_time).format('HH:mm'),
|
|
|
|
|
end_time: this.$moment(i.end_time).format('HH:mm'),
|
|
|
|
|
kaiqishuliang: i.kaiqishuliang,
|
|
|
|
|
kaiqishuliang1: i.kaiqishuliang1,
|
|
|
|
|
yinpaishui: i.yinpaishui,
|
|
|
|
|
diaolingleixing: i.diaolingleixing,
|
|
|
|
|
content: i.content,
|
|
|
|
|
level: i.level,
|
|
|
|
|
leibie: i.leibie
|
|
|
|
|
}))
|
|
|
|
|
this.dialogVisible = true
|
|
|
|
|
},
|
|
|
|
|
cloneTransfer () {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: 'menu_14',
|
|
|
|
|
params: {
|
|
|
|
|
cloneTransfer: this.$refs['xyTable'].getSelection().map(i => ({
|
|
|
|
|
equipment_id: i.equipment_id,
|
|
|
|
|
start_time: this.$moment(i.start_time).format('HH:mm'),
|
|
|
|
|
end_time: this.$moment(i.end_time).format('HH:mm'),
|
|
|
|
|
kaiqishuliang: i.kaiqishuliang,
|
|
|
|
|
kaiqishuliang1: i.kaiqishuliang1,
|
|
|
|
|
yinpaishui: i.yinpaishui,
|
|
|
|
|
diaolingleixing: i.diaolingleixing,
|
|
|
|
|
content: i.content,
|
|
|
|
|
level: i.level,
|
|
|
|
|
}))
|
|
|
|
|
cloneTransfer: this.clones
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -778,6 +960,7 @@ export default {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log(this.table)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|