今日调令列表字段调整

master
xy 1 year ago
parent 5abc0bd280
commit f6b36bd48e

@ -13,6 +13,8 @@
<header-content :auths="auths_auth_mixin"> <header-content :auths="auths_auth_mixin">
<template #search> <template #search>
<div style="display: flex"> <div style="display: flex">
<el-cascader clearable placeholder="请选择范围" size="small" collapse-tags :value="select.filter[2].value" :options="equipments" :props="{ children: 'children', label: 'name', value: 'id', multiple: true, emitPath: false }" @change="handleCheckChange"></el-cascader>
<Select clearable v-model="select.filter[1].value" placeholder="请选择类别" style="width: 140px;margin-left: 6px;"> <Select clearable v-model="select.filter[1].value" placeholder="请选择类别" style="width: 140px;margin-left: 6px;">
<Option v-for="item in abilities" :value="item.value">{{ item.key }}</Option> <Option v-for="item in abilities" :value="item.value">{{ item.key }}</Option>
</Select> </Select>
@ -39,17 +41,17 @@
</div> </div>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="4"> <!-- <el-col :span="4">-->
<el-tree :data="equipments" <!-- <el-tree :data="equipments"-->
node-key="id" <!-- node-key="id"-->
:style="{ 'max-height': treeHeight, 'overflow': 'scroll' }" <!-- :style="{ 'max-height': treeHeight, 'overflow': 'scroll' }"-->
ref="elTree" <!-- ref="elTree"-->
:props="{ children: 'children', label: 'name' }" <!-- :props="{ children: 'children', label: 'name' }"-->
show-checkbox <!-- show-checkbox-->
@check="handleCheckChange"> <!-- @check="handleCheckChange">-->
</el-tree> <!-- </el-tree>-->
</el-col> <!-- </el-col>-->
<el-col :span="20"> <el-col :span="24">
<xy-table <xy-table
:btn-width="240" :btn-width="240"
:auths="auths_auth_mixin" :auths="auths_auth_mixin"
@ -190,32 +192,32 @@ export default {
"align": "center", "align": "center",
formatter: (data,row,val) => this.abilities.find(i => i.value === val)?.key formatter: (data,row,val) => this.abilities.find(i => i.value === val)?.key
}, },
{ // {
prop: "status", // prop: "status",
label: "状态", // label: "",
align: "center", // align: "center",
width: 420, // width: 420,
customFn: row => ( // customFn: row => (
<div class="list-item__operate"> // <div class="list-item__operate">
{ // {
this.progressStatus(row).map((s, si) => ( // this.progressStatus(row).map((s, si) => (
<el-tooltip effect="dark" content={this.operateTitle(row, s)||'暂无时间'} placement="top"> // <el-tooltip effect="dark" content={this.operateTitle(row, s)||''} placement="top">
<div class="step"> // <div class="step">
<div class="step-icon"> // <div class="step-icon">
<div class={`step-icon__cir-${this.stepFormat(row.status, s.value)} step-icon__cir`}></div> // <div class={`step-icon__cir-${this.stepFormat(row.status, s.value)} step-icon__cir`}></div>
{ // {
si < this.progressStatus(row).length - 1 ? (<div // si < this.progressStatus(row).length - 1 ? (<div
class={`step-icon__line-${this.stepFormat(row.status, s.value)} step-icon__line`}></div>) : "" // class={`step-icon__line-${this.stepFormat(row.status, s.value)} step-icon__line`}></div>) : ""
} // }
</div> // </div>
<div class="step-label">{s.label}</div> // <div class="step-label">{s.label}</div>
</div> // </div>
</el-tooltip> // </el-tooltip>
)) // ))
} // }
</div> // </div>
) // )
}, // },
{ {
"prop": "act_start_time", "prop": "act_start_time",
"label": "实际开始时间", "label": "实际开始时间",
@ -492,11 +494,11 @@ export default {
children: res.filter(j => j.area === i.value) children: res.filter(j => j.area === i.value)
})) }))
this.$nextTick(() => { // this.$nextTick(() => {
this.areas.forEach(i => { // this.areas.forEach(i => {
this.$refs['elTree'].setChecked(`area_${i.value}`, true, true) // this.$refs['elTree'].setChecked(`area_${i.value}`, true, true)
}) // })
}) // })
}, },
async getArea() { async getArea() {
@ -537,10 +539,12 @@ export default {
}, },
handleCheckChange (data, checked, indeterminate) { handleCheckChange (data, checked, indeterminate) {
this.treeValue = this.$refs['elTree'].getCheckedNodes(true)?.filter(i => !i.children)?.map(i => i.name).toString() console.log(data)
this.select.filter[2].value = this.$refs['elTree'].getCheckedNodes(true)?.filter(i => !i.children)?.map(i => i.id) this.select.filter[2].value = data.filter(i => i)
// this.treeValue = this.$refs['elTree'].getCheckedNodes(true)?.filter(i => !i.children)?.map(i => i.name).toString()
this.$refs['xyTable'].getTableData(true) // this.select.filter[2].value = this.$refs['elTree'].getCheckedNodes(true)?.filter(i => !i.children)?.map(i => i.id)
//
// this.$refs['xyTable'].getTableData(true)
}, },
}, },

Loading…
Cancel
Save