diff --git a/.env.development b/.env.development
index 10d6f17..4b86c0b 100644
--- a/.env.development
+++ b/.env.development
@@ -3,9 +3,9 @@ ENV = 'development'
# base api
-VUE_APP_DOMIAN=http://192.168.60.99:8003/
+VUE_APP_DOMIAN=http://192.168.60.99:9003/
VUE_APP_BASE_API = ''
-VUE_APP_UPLOAD=http://192.168.60.99:8003/api/admin/upload-file
+VUE_APP_UPLOAD=http://192.168.60.99:9003/api/admin/upload-file
VUE_APP_OUT_URL = http://192.168.60.18:8001
#VUE_APP_DOMIAN=http://192.168.60.99:9003/
diff --git a/src/views/dashboard/components/budgetStatic.vue b/src/views/dashboard/components/budgetStatic.vue
index c05fb4b..75511f6 100644
--- a/src/views/dashboard/components/budgetStatic.vue
+++ b/src/views/dashboard/components/budgetStatic.vue
@@ -107,7 +107,7 @@ export default {
label: '进展率',
width: 200,
customFn: (row) => {
- let m2 = row.update_money;
+ let m2 = row.update_money||0;
let m1 = row.money;
let m3 = row.use_money_total;
let per = 0;
@@ -169,7 +169,7 @@ export default {
for (let m of res.list.data) {
m.pid_info_name = m.pid_info?.name
m.pid_info_id = m.pid_info?.id
- console.log('m.pid_info_name',m.pid_info_name)
+ // console.log('m.pid_info_name',m.pid_info_name)
}
res.list.data.sort((a,b)=>{
return b.pid_info_id - a.pid_info_id
@@ -186,6 +186,20 @@ export default {
},
selected (selections, selected) {
+ // selections: 所有已选中的行数组
+ // selected: 当前点击的行
+
+ // 确保 selected 存在且有效
+ if (!selected || !selected.id) {
+ // 如果没有 selected,说明可能是取消选择操作,使用 selections 更新
+ this.selections = Array.isArray(selections) ? selections : []
+ return
+ }
+
+ // 直接使用 selections 参数来更新选中列表,这样更可靠
+ // 因为 selections 是表格组件当前所有已选中的行
+ this.selections = Array.isArray(selections) ? [...selections] : []
+
// if (selected['pid_info_name-span']?.rowspan > 1) {
// if (this.selections.find(i => i.id === selected.id)) {
// let len = selected['pid_info_name-span'].rowspan
@@ -197,17 +211,29 @@ export default {
// this.selections.push(...this.list.slice(idx,idx+len))
// }
// } else {
- if (this.selections.find(i => i.id === selected.id)) {
- let idx = this.selections.indexOf(this.selections.find(i => i.id === selected.id))
- this.selections.splice(idx,1)
- } else {
- this.selections.push(selected)
- }
+ // const existingIndex = this.selections.findIndex(i => i.id === selected.id)
+ // if (existingIndex > -1) {
+ // // 已选中,取消选中
+ // this.selections.splice(existingIndex, 1)
+ // } else {
+ // // 未选中,添加到选中列表
+ // this.selections.push(selected)
+ // }
// }
-
},
selectAll (selections) {
- this.selections = selections
+ // 确保 selections 是一个数组
+ this.selections = Array.isArray(selections) ? [...selections] : []
+
+ // 强制更新视图,确保选中状态同步
+ this.$nextTick(() => {
+ // 如果取消全选,确保表格的选中状态也被清除
+ if (this.selections.length === 0) {
+ if (this.$refs.xyTable && this.$refs.xyTable.clearSelection) {
+ this.$refs.xyTable.clearSelection()
+ }
+ }
+ })
},
summary ({ columns,data }) {
return columns.map((column,index) => {
@@ -242,6 +268,19 @@ export default {
this.getPlanProgress(val)
},
immediate: true
+ },
+ drawer: {
+ handler: function(val) {
+ if (val) {
+ // 打开抽屉时,清空选中状态
+ this.selections = []
+ this.$nextTick(() => {
+ if (this.$refs.xyTable && this.$refs.xyTable.clearSelection) {
+ this.$refs.xyTable.clearSelection()
+ }
+ })
+ }
+ }
}
},
created() {
diff --git a/src/views/statisticalReport/budgetProgress.vue b/src/views/statisticalReport/budgetProgress.vue
index 87b60a9..b9db926 100644
--- a/src/views/statisticalReport/budgetProgress.vue
+++ b/src/views/statisticalReport/budgetProgress.vue
@@ -23,7 +23,7 @@
type="year"
placement="bottom-start"
style="width: 160px"
- @on-change="(e)=>select.year = e"
+ @on-change="(e)=>{select.year = e,getType()}"
/>
@@ -37,7 +37,7 @@
type="date"
style="width: 160px"
>
-