diff --git a/src/components/CommonTable/index.vue b/src/components/CommonTable/index.vue
index 5d444cf..8ae578c 100644
--- a/src/components/CommonTable/index.vue
+++ b/src/components/CommonTable/index.vue
@@ -125,4 +125,10 @@ export default {
.el-table tr.table-header-row {
background: #e5c5d2; /* 示例, 对表格样式上的修饰 */
}
+.v-btn{
+ min-width:unset!important;
+ width:50px!important;
+}
+
+
diff --git a/src/components/CrudTable/index.vue b/src/components/CrudTable/index.vue
index 53c2dc9..eff0fb4 100644
--- a/src/components/CrudTable/index.vue
+++ b/src/components/CrudTable/index.vue
@@ -24,6 +24,7 @@
:list-query="listQuery"
:list-loading="listLoading"
@handleEdit="Edit"
+ @handleDetail="Detail"
@handleDelete="Delete"
@handleCurrentChange="Refresh"
@handleSizeChange="Refresh"
@@ -36,25 +37,33 @@
:visible.sync="dialogFormVisible"
v-if="dialogFormVisible"
width="80%">
-
@@ -188,7 +197,7 @@ export default {
method: 'post',
params: { id },
}).then(() => {
- this.fetchData(this.listQuery);
+ this.Refresh()
});
});
},
@@ -209,7 +218,19 @@ export default {
method: 'post',
params: { id },
}).then((response) => {
- this.fetchData(this.listQuery);
+ this.entity = response.data;
+ this.dialogFormVisible = true;
+ });
+ },
+
+ Detail(id) {
+ this.dialogStatus = 'detail';
+
+ this.axios({
+ url: `/${this.tableName}/detail`,
+ method: 'post',
+ params: { id },
+ }).then((response) => {
this.entity = response.data;
this.dialogFormVisible = true;
});
@@ -227,7 +248,7 @@ export default {
data: this.entity,
}).then(() => {
this.dialogFormVisible = false;
- this.fetchData(this.listQuery);
+ this.Refresh()
});
})
.catch(() => {
@@ -249,7 +270,7 @@ export default {
data: this.entity,
}).then(() => {
this.dialogFormVisible = false;
- this.fetchData(this.listQuery);
+ this.Refresh()
});
})
.catch(() => {
diff --git a/src/components/FormDesigner/GenerateForm.vue b/src/components/FormDesigner/GenerateForm.vue
index 2a2a6c5..7f907ac 100644
--- a/src/components/FormDesigner/GenerateForm.vue
+++ b/src/components/FormDesigner/GenerateForm.vue
@@ -27,7 +27,8 @@
:key="citem.key"
:models.sync="models"
:rules="rules"
- :widget="citem"/>
+ :widget="citem"
+ :disabled="disabled"/>
@@ -38,6 +39,7 @@
:models.sync="models"
:rules="rules"
:widget="item"
+ :disabled="disabled"
/>
diff --git a/src/components/FormDesigner/GenerateFormItem.vue b/src/components/FormDesigner/GenerateFormItem.vue
index 356a464..2ba23dd 100644
--- a/src/components/FormDesigner/GenerateFormItem.vue
+++ b/src/components/FormDesigner/GenerateFormItem.vue
@@ -185,12 +185,13 @@ export default {
Tinymce,
UploadAffix,
},
- props: ['widget', 'models', 'rules'],
+ props: ['widget', 'models', 'rules', 'disabled'],
data() {
return {
dataModel: this.models[this.widget.model],
}
},
+
watch: {
dataModel: {
deep: true,
@@ -202,6 +203,16 @@ export default {
})
},
},
+ disabled: {
+ deep: true,
+ immediate: true,
+ handler(val) {
+ this.dataModel = val[this.widget.model]
+ if (this.widget.options.uploadParams) {
+ this.widget.options.uploadParams.IsDetail = this.disabled
+ }
+ },
+ },
models: {
deep: true,
immediate: true,
diff --git a/src/components/UploadAffix/index.vue b/src/components/UploadAffix/index.vue
index 2ec1a5d..3be7e0c 100644
--- a/src/components/UploadAffix/index.vue
+++ b/src/components/UploadAffix/index.vue
@@ -12,8 +12,7 @@
>
-
+
backup
diff --git a/src/views/Archive/person_detail.vue b/src/views/Archive/person_detail.vue
index 2978da1..be64001 100644
--- a/src/views/Archive/person_detail.vue
+++ b/src/views/Archive/person_detail.vue
@@ -1,6 +1,6 @@
-
+