diff --git a/.env.development b/.env.development
index 74c1085..6936fd6 100644
--- a/.env.development
+++ b/.env.development
@@ -2,7 +2,7 @@
ENV='development'
# base api
-VUE_APP_BASE_API=http://wuxiwuye.ali251.langye.net/
-VUE_APP_UPLOAD_API=http://wuxiwuye.ali251.langye.net/api/admin/upload-file
+VUE_APP_BASE_API=
+VUE_APP_DEV_PROXY_TARGET=http://127.0.0.1:8000
+VUE_APP_UPLOAD_API=http://127.0.0.1:8000/api/admin/upload-file
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview
-
diff --git a/dist.zip b/dist.zip
index 1f04b92..683a883 100644
Binary files a/dist.zip and b/dist.zip differ
diff --git a/src/views/assets/component/addLand.vue b/src/views/assets/component/addLand.vue
index b69a9e3..f0ff707 100644
--- a/src/views/assets/component/addLand.vue
+++ b/src/views/assets/component/addLand.vue
@@ -183,6 +183,12 @@ export default {
prop: "shijimianji",
width: 120,
},
+ {
+ label: "房产状态",
+ prop: "xianzhuang",
+ width: 120,
+ formatter: (row, column, value) => value || "无",
+ },
{
label: "入账时间",
prop: "ruzhangshijian",
diff --git a/src/views/assets/detail.vue b/src/views/assets/detail.vue
index 5af612a..127d26a 100644
--- a/src/views/assets/detail.vue
+++ b/src/views/assets/detail.vue
@@ -74,41 +74,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+ 证件图片
+
+
附件
+
@@ -445,6 +465,7 @@ import lease from '@/views/assets/lease.vue';
// import drawer from "@/views/component/drawer.vue";
import imports from "@/views/component/imports.vue";
import atlas from "@/views/assets/atlas.vue";
+import documents from "@/views/assets/documents.vue";
import files from "@/views/assets/files.vue";
import handle from "@/views/assets/component/addHandle.vue";
import { deepCopy } from '@/utils'
@@ -458,6 +479,7 @@ export default {
history,
lease,
atlas,
+ documents,
// drawer,
imports,
files,
@@ -493,12 +515,65 @@ export default {
customFormId: "",
tableName: "",
},
+ selectedRows: [],
+ selectedRowMap: {},
};
},
methods: {
index,
destroy,
download,
+ handleSelectionChange(selection) {
+ const currentPageRows = this.$refs['xyTable']?.getListData?.() || [];
+ currentPageRows.forEach((row) => {
+ if (this.selectedRowMap[row.id]) {
+ delete this.selectedRowMap[row.id];
+ }
+ });
+ (selection || []).forEach((row) => {
+ this.selectedRowMap[row.id] = row;
+ });
+ this.selectedRows = Object.values(this.selectedRowMap);
+ },
+ syncPageSelection() {
+ const currentPageRows = this.$refs['xyTable']?.getListData?.() || [];
+ currentPageRows.forEach((row) => {
+ this.$refs['xyTable']?.toggleRowSelection(row, !!this.selectedRowMap[row.id]);
+ });
+ },
+ batchDelete() {
+ if (this.selectedRows.length === 0) {
+ this.$message({
+ type: 'warning',
+ message: '请先选择要删除的数据'
+ });
+ return;
+ }
+
+ this.$confirm(`确认删除选中的 ${this.selectedRows.length} 条数据吗?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ return Promise.all(
+ this.selectedRows.map((row) =>
+ this.destroy({
+ table_name: this.customForm.tableName,
+ id: row.id,
+ })
+ )
+ ).then(() => {
+ this.$message({
+ type: 'success',
+ message: '批量删除成功'
+ });
+ this.selectedRowMap = {};
+ this.selectedRows = [];
+ this.$refs['xyTable'].clearSelection();
+ this.$refs['xyTable'].getTableData(true);
+ });
+ }).catch(() => {});
+ },
reset() {
this.select.filter.splice(1);
this.select.filter[0] = {
@@ -1064,33 +1139,9 @@ export default {
prop: i.field,
label: i.name,
width: i.width,
- align: alignLeft.find((m) => m === i.field) ? "left" : "center",
+ align: "left",
fixed: i.is_fixed,
- customFn: (row) => {
- return (
-
-
-
-
-
-
-
-
- 查看
-
- // {
- // this.$refs["addHistory"].setRow(row);
- // this.$refs["addHistory"].setType("show");
- // this.$refs["addHistory"].show();
- // },
- // }}
- // >
- // 查看
- //
- );
- },
+ formatter: (row, column, cellValue) => cellValue || "无",
});
break;
default:
@@ -1116,6 +1167,12 @@ export default {
label: "序号",
formatter: (row, column, cellValue, index) => (this.$refs['xyTable'].selectOpt.page - 1) * this.$refs['xyTable'].selectOpt.page_size + index + 1
})
+ this.table.unshift({
+ type: "selection",
+ width: 50,
+ align: "center",
+ reserveSelection: false
+ })
this.table.push({
prop: 'admin.name',
width: 120,
@@ -1134,6 +1191,7 @@ export default {
})
},
adjustAlignment () {
+ this.syncPageSelection();
if (this.firstAdjustTable) {
const data = this.$refs['xyTable'].getListData();
if (data.length < 2) return;
diff --git a/vue.config.js b/vue.config.js
index 67c394e..bd4b56b 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -48,11 +48,11 @@ module.exports = {
},
//before: require('./mock/mock-server.js'),
proxy: {
- [process.env.VUE_APP_BASE_API]: {
- target: process.env.VUE_APP_BASE_API,
+ '/api': {
+ target: process.env.VUE_APP_DEV_PROXY_TARGET || 'http://127.0.0.1:8000',
changeOrigin: true, //配置跨域
pathRewrite: {
- ['^' + process.env.VUE_APP_BASE_API]: process.env.VUE_APP_BASE_API
+ '^/api': '/api'
}
}
}