@@ -497,16 +497,18 @@ export default {
setTimeout(
() => {
Object.keys(this.dataForm).forEach((key) => {
+ console.log('reset form, key', key)
if (excludeId && key === "id") return;
if ("files" in this.dataForm) this.dataForm.files = [];
- if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
- else this.dataForm[key] = null;
+ else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
+ else this.$set(this.dataForm, key, null)
if (Array.isArray(this.fileList)) {
this.fileList = [];
}
});
this.activeMenu = this.configs.menu[0].name;
- this.$refs.dataForm[0].clearValidate();
+ this.$refs.dataForm[0].resetFields();
+ console.log("清除Form...", this.dataForm);
},
immediate ? 0 : 200
);
diff --git a/src/mixins/basic-page.js b/src/mixins/basic-page.js
index 93c812c..391c639 100644
--- a/src/mixins/basic-page.js
+++ b/src/mixins/basic-page.js
@@ -103,18 +103,20 @@ export default {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
+ console.log('va', val)
this.deleteHandle(val.data.id, val.data.name)
}
},
// 删除
deleteHandle(id, name) {
- this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
+ this.$confirm(`确定对删除 ${name}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
- this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
+ // this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
+ this.$http.delete(this.urlOptions.deleteURL + `/${id}`).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
diff --git a/src/router/index.js b/src/router/index.js
index 8f8771f..0e37e2d 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -74,7 +74,7 @@ export function addDynamicRoute(routeParams, router) {
}
const router = new Router({
- mode: 'history',
+ mode: 'hash',
scrollBehavior: () => ({ y: 0 }),
routes: pageRoutes.concat(moduleRoutes)
})
diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue
index bebfe7e..a35394b 100644
--- a/src/views/atomViews/ListViewWithHead.vue
+++ b/src/views/atomViews/ListViewWithHead.vue
@@ -274,7 +274,6 @@ export default {
}).then(({ data: res }) => {
if (res.code === 0) {
this.$message.success("删除成功!");
-
this.page = 1;
this.size =
"defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;
diff --git a/src/views/modules/pms/order/components/BaseSearchForm.vue b/src/views/modules/pms/order/components/BaseSearchForm.vue
index c4a3436..edef11f 100644
--- a/src/views/modules/pms/order/components/BaseSearchForm.vue
+++ b/src/views/modules/pms/order/components/BaseSearchForm.vue
@@ -6,26 +6,45 @@
-
-
-
-
+ :rules="opt.bind?.rules ? opt.bind.rules : undefined">
+
+
+
-
+
+ action="https://jsonplaceholder.typicode.com/posts/">
上传文件
{{ opt.button.name }}
+ @click="handleBtnClick(opt.button.name)">
+ {{ opt.button.name }}
+
@@ -61,21 +80,7 @@ export default {
dataForm: {},
};
},
-
- // 这个 watch 出现得没啥必要......
- // watch: {
- // dataForm: {
- // handler: (val) => {
- // console.log("[BaseSearchForm::watcher::dataForm]", val);
- // },
- // deep: true,
- // },
- // },
-
- created() {},
mounted() {
- // console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
-
this.headConfig.fields.forEach((field, index) => {
// 没有 field.prop ,则为按钮之类的
if (!field.prop) return;
diff --git a/src/views/modules/pms/order/components/DialogJustForm.vue b/src/views/modules/pms/order/components/DialogJustForm.vue
index f35e8e7..36b02c8 100644
--- a/src/views/modules/pms/order/components/DialogJustForm.vue
+++ b/src/views/modules/pms/order/components/DialogJustForm.vue
@@ -410,7 +410,7 @@ export default {
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
this.$emit("refreshDataList");
- if (method === "POST") this.handleClose();
+ this.handleClose();
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
diff --git a/src/views/modules/pms/order/components/ListSectionWithHead.vue b/src/views/modules/pms/order/components/ListSectionWithHead.vue
index 021869e..6830209 100644
--- a/src/views/modules/pms/order/components/ListSectionWithHead.vue
+++ b/src/views/modules/pms/order/components/ListSectionWithHead.vue
@@ -35,7 +35,8 @@
v-if="renderDialog"
fullscreen
:configs="dialogConfig"
- @destroy-dialog="renderDialog = false" />
+ @destroy-dialog="renderDialog = false"
+ @refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params));" />
+ @destroy-dialog="renderMenuDialog = false"
+ @refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params));" />
-
-