diff --git a/src/views/Aspiration/Aspiration.vue b/src/views/Aspiration/Aspiration.vue index d12f685..f5d6711 100644 --- a/src/views/Aspiration/Aspiration.vue +++ b/src/views/Aspiration/Aspiration.vue @@ -22,15 +22,24 @@ @click="isShowAdd = true" >新增 - + + + + + 搜索 + > + @@ -93,6 +102,28 @@ :edit-render="{ name: 'input', attrs: { type: 'text' } }" /> + + - - - - - - - - - - - - * + * { + margin-left: 10px; +} diff --git a/src/views/Aspiration/components/AddAspiration.vue b/src/views/Aspiration/components/AddAspiration.vue index 2c33a35..bc8fd61 100644 --- a/src/views/Aspiration/components/AddAspiration.vue +++ b/src/views/Aspiration/components/AddAspiration.vue @@ -87,6 +87,10 @@ > + + + + + + {{ form['is_open'] ? '是' : '否' }} + +
@@ -44,13 +48,13 @@
- + - + {{ diff --git a/src/views/Batch/Batch.vue b/src/views/Batch/Batch.vue index 9cfacb7..d7dcf14 100644 --- a/src/views/Batch/Batch.vue +++ b/src/views/Batch/Batch.vue @@ -22,15 +22,24 @@ @click="isShowAdd = true" >新增
- + + 搜索 + > + @@ -349,6 +358,9 @@ export default { page_size: 20, keyword: "", show_relation: ["aspiration", "batchSubs"], + "filter[0][key]": 'aspiration_id', + "filter[0][op]": 'eq', + "filter[0][value]": '' }, total: 0, allAlign: null, @@ -375,6 +387,28 @@ export default { }; }, computed: { + groupAspiration() { + const yearMap = {}; + + // 遍历数据,按年份分组 + this.aspiration.forEach(item => { + if (!yearMap[item.year]) { + yearMap[item.year] = { + value: item.year, + label: `${item.year}年`, + children: [] + }; + } + yearMap[item.year].children.push({ + value: item.id, + label: item.name + // 可以根据需要添加其他字段 + }); + }); + + // 转换为数组格式 + return Object.values(yearMap); + }, isActiveStatus() { return function (row) { if (this.$refs["table"]) { @@ -619,6 +653,9 @@ export default {