|
|
|
|
@ -282,76 +282,102 @@
|
|
|
|
|
</div>
|
|
|
|
|
<!--$refs['drawer'].setId(row.id);
|
|
|
|
|
$refs['drawer'].show();-->
|
|
|
|
|
<xy-table
|
|
|
|
|
:btnCondition="btnCondition"
|
|
|
|
|
:span-method="objectSpanMethod"
|
|
|
|
|
:format-list-data="mergeData"
|
|
|
|
|
:is-page="false"
|
|
|
|
|
:btn-width="300"
|
|
|
|
|
:auths="auths_auth_mixin"
|
|
|
|
|
:delay-req="true"
|
|
|
|
|
:destroy-action="destroy"
|
|
|
|
|
ref="xyTable"
|
|
|
|
|
:border="true"
|
|
|
|
|
:action="index"
|
|
|
|
|
:req-opt="tableSelect"
|
|
|
|
|
:destroy-req-opt="select"
|
|
|
|
|
:table-item="table"
|
|
|
|
|
@detail="
|
|
|
|
|
<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="300"
|
|
|
|
|
:auths="auths_auth_mixin"
|
|
|
|
|
:delay-req="true"
|
|
|
|
|
:destroy-action="destroy"
|
|
|
|
|
ref="xyTable"
|
|
|
|
|
:border="true"
|
|
|
|
|
: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 #callback="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
>
|
|
|
|
|
<template #adjust="{ row }">
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
$refs['adjust'].setId(row.id),
|
|
|
|
|
$refs['adjust'].setType('editor'),
|
|
|
|
|
$refs['adjust'].show()
|
|
|
|
|
"
|
|
|
|
|
>调整</Button
|
|
|
|
|
>
|
|
|
|
|
</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"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
ghost
|
|
|
|
|
@click="setTransferStatus(0,row)"
|
|
|
|
|
>取消</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
>反馈</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"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
ghost
|
|
|
|
|
@click="setTransferStatus(0,row)"
|
|
|
|
|
>取消</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<dialoger
|
|
|
|
|
:table-name="customForm.tableName"
|
|
|
|
|
@ -373,6 +399,7 @@
|
|
|
|
|
></imports>
|
|
|
|
|
|
|
|
|
|
<callback ref="callback"></callback>
|
|
|
|
|
<adjust ref="adjust" @refresh="$refs['xyTable'].getTableData()"></adjust>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -396,6 +423,7 @@ import headerContent from "@/components/LxHeader/XyContent.vue";
|
|
|
|
|
import drawer from "@/views/component/drawer.vue";
|
|
|
|
|
import imports from "@/views/component/imports.vue";
|
|
|
|
|
import callback from "@/views/order/component/callback.vue";
|
|
|
|
|
import adjust from "@/views/order/component/adjust.vue";
|
|
|
|
|
import {deepCopy} from "@/utils";
|
|
|
|
|
import {mergeTableRow} from "@/utils/mergeTableRow";
|
|
|
|
|
export default {
|
|
|
|
|
@ -406,6 +434,7 @@ export default {
|
|
|
|
|
drawer,
|
|
|
|
|
imports,
|
|
|
|
|
callback,
|
|
|
|
|
adjust
|
|
|
|
|
},
|
|
|
|
|
mixins: [authMixin],
|
|
|
|
|
provide: {
|
|
|
|
|
@ -413,6 +442,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
equipments: [],
|
|
|
|
|
areas: [],
|
|
|
|
|
abilities: [],
|
|
|
|
|
window: {
|
|
|
|
|
@ -441,7 +471,12 @@ export default {
|
|
|
|
|
key: "start_time",
|
|
|
|
|
op: "like",
|
|
|
|
|
value: this.$moment().format('YYYY-MM-DD')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "equipment_id",
|
|
|
|
|
op: "in",
|
|
|
|
|
value: []
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
sort_name: 'start_time',
|
|
|
|
|
page_size: 9999,
|
|
|
|
|
@ -524,6 +559,25 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getEquipments () {
|
|
|
|
|
const res = (await index({
|
|
|
|
|
table_name: 'equipments',
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 9999
|
|
|
|
|
},false))?.data || []
|
|
|
|
|
this.equipments = this.areas.map(i => ({
|
|
|
|
|
id: `area_${i.value}`,
|
|
|
|
|
name: i.key,
|
|
|
|
|
children: res.filter(j => j.area === i.value)
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.areas.forEach(i => {
|
|
|
|
|
this.$refs['elTree'].setChecked(`area_${i.value}`, true, true)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getArea() {
|
|
|
|
|
const obj = (await formFieldShow({ id: 4 }, false))?.select_item;
|
|
|
|
|
if (obj && typeof obj === "object") {
|
|
|
|
|
@ -538,6 +592,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.$bus.$emit("areas", this.areas);
|
|
|
|
|
await this.getEquipments()
|
|
|
|
|
},
|
|
|
|
|
async getAbility() {
|
|
|
|
|
const obj = (await formFieldShow({ id: 31 }, false))?.select_item;
|
|
|
|
|
@ -609,6 +664,13 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleCheckChange (data, checked, indeterminate) {
|
|
|
|
|
this.treeValue = this.$refs['elTree'].getCheckedNodes(true)?.filter(i => !i.children)?.map(i => i.name).toString()
|
|
|
|
|
this.select.filter[3].value = this.$refs['elTree'].getCheckedNodes(true)?.filter(i => !i.children)?.map(i => i.id)
|
|
|
|
|
|
|
|
|
|
this.$refs['xyTable'].getTableData(true)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
setTransferStatus (status,row) {
|
|
|
|
|
let copyRow = deepCopy(row);
|
|
|
|
|
copyRow.status = status;
|
|
|
|
|
@ -930,6 +992,10 @@ export default {
|
|
|
|
|
filter,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
treeHeight () {
|
|
|
|
|
return (this.$refs['xyTable']?.tableHeight + 36 || 630) + 'px'
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.window.width = screen.availWidth * 0.95
|
|
|
|
|
|