发布 v2.3.2

This commit is contained in:
疯狂的狮子li
2021-06-11 10:00:05 +08:00
parent 801f7cd8f7
commit 3e5b850e25
57 changed files with 459 additions and 1124 deletions

View File

@ -1,348 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="key键" prop="testKey">
<el-input
v-model="queryParams.testKey"
placeholder="请输入key键"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="值" prop="value">
<el-input
v-model="queryParams.value"
placeholder="请输入值"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="daterangeCreateTime"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['demo:demo:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['demo:demo:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['demo:demo:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['demo:demo:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="demoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键" align="center" prop="id" v-if="false"/>
<el-table-column label="部门id" align="center" prop="deptId" />
<el-table-column label="用户id" align="center" prop="userId" />
<el-table-column label="排序号" align="center" prop="orderNum" />
<el-table-column label="key键" align="center" prop="testKey" />
<el-table-column label="值" align="center" prop="value" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['demo:demo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['demo:demo:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改测试单表对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="部门id" prop="deptId">
<el-input v-model="form.deptId" placeholder="请输入部门id" />
</el-form-item>
<el-form-item label="用户id" prop="userId">
<el-input v-model="form.userId" placeholder="请输入用户id" />
</el-form-item>
<el-form-item label="排序号" prop="orderNum">
<el-input v-model="form.orderNum" placeholder="请输入排序号" />
</el-form-item>
<el-form-item label="key键" prop="testKey">
<el-input v-model="form.testKey" placeholder="请输入key键" />
</el-form-item>
<el-form-item label="值" prop="value">
<el-input v-model="form.value" placeholder="请输入值" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listDemo, getDemo, delDemo, addDemo, updateDemo, exportDemo } from "@/api/demo/demo";
export default {
name: "Demo",
components: {
},
data() {
return {
//按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 测试单表表格数据
demoList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 创建时间时间范围
daterangeCreateTime: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
testKey: undefined,
value: undefined,
createTime: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
testKey: [
{ required: true, message: "key键不能为空", trigger: "blur" }
],
value: [
{ required: true, message: "值不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询测试单表列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
listDemo(this.queryParams).then(response => {
this.demoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
deptId: undefined,
userId: undefined,
orderNum: undefined,
testKey: undefined,
value: undefined,
version: undefined,
createTime: undefined,
createBy: undefined,
updateTime: undefined,
updateBy: undefined,
delFlag: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加测试单表";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getDemo(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改测试单表";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateDemo(this.form).then(response => {
this.buttonLoading = false;
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDemo(this.form).then(response => {
this.buttonLoading = false;
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除测试单表编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true;
return delDemo(ids);
}).then(() => {
this.loading = false;
this.getList();
this.msgSuccess("删除成功");
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有测试单表数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportDemo(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}
}
};
</script>

View File

@ -80,6 +80,17 @@
<span>更新日志</span>
</div>
<el-collapse accordion>
<el-collapse-item title="v2.3.2 - 2021-6-11">
<ol>
<li>add redis锁工具类编写</li>
<li>update spring-cache 整合 redisson</li>
<li>update MybatisPlus整合Redis二级缓存</li>
<li>update swagger 升级为 3.0.0 使用 OAS_30 协议</li>
<li>update 优化 代码生成器 增加表单防重注解</li>
<li>update 优化 锁切面代码 key到常量类</li>
<li>fix 修复相对路径上传异常问题</li>
</ol>
</el-collapse-item>
<el-collapse-item title="v2.3.1 - 2021-6-4">
<ol>
<li>add 增加 redisson 分布式锁 注解与demo案例</li>

View File

@ -410,7 +410,7 @@ export default {
return runJob(row.jobId, row.jobGroup);
}).then(() => {
this.msgSuccess("执行成功");
})
}).catch(() => {});
},
/** 任务详细信息 */
handleView(row) {
@ -471,7 +471,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -486,7 +486,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
}
}
};

View File

@ -269,7 +269,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 清空按钮操作 */
handleClean() {
@ -282,7 +282,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("清空成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -297,7 +297,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
}
}
};

View File

@ -202,7 +202,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 清空按钮操作 */
handleClean() {
@ -215,7 +215,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("清空成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -230,7 +230,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
}
}
};

View File

@ -120,7 +120,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("强退成功");
})
}).catch(() => {});
}
}
};

View File

@ -290,7 +290,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 清空按钮操作 */
handleClean() {
@ -303,7 +303,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("清空成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -318,7 +318,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
}
}
};

View File

@ -338,7 +338,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -353,7 +353,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {

View File

@ -57,17 +57,17 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dept:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['system:dept:add']"
>新增</el-button>
@ -310,8 +310,8 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
}
}
};
</script>
</script>

View File

@ -337,7 +337,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -352,7 +352,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
}
}
};

View File

@ -342,7 +342,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -357,7 +357,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {

View File

@ -163,7 +163,7 @@
</el-col>
<el-col :span="12">
<el-form-item v-if="form.menuType != 'M'" label="权限标识">
<el-input v-model="form.perms" placeholder="请权限标识" maxlength="100" />
<el-input v-model="form.perms" placeholder="请输入权限标识" maxlength="100" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -393,7 +393,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
}
}
};

View File

@ -336,7 +336,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
}
}
};

View File

@ -309,7 +309,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -324,7 +324,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
}
}
};

View File

@ -593,7 +593,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -608,7 +608,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
}
}
};

View File

@ -631,7 +631,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@ -646,7 +646,7 @@ export default {
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
}).catch(() => {});
},
/** 导入按钮操作 */
handleImport() {

View File

@ -283,7 +283,7 @@ export default {
return synchDb(tableName);
}).then(() => {
this.msgSuccess("同步成功");
})
}).catch(() => {});
},
/** 打开导入表弹窗 */
openImportTable() {
@ -333,7 +333,7 @@ export default {
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
}).catch(() => {});
}
}
};