将文件拖到此处,或
@@ -344,7 +252,9 @@ export default {
// 角色选项
roleOptions: [],
// 表单参数
- form: {},
+ form: {
+ // type:'1'
+ },
defaultProps: {
children: "children",
label: "label"
@@ -386,7 +296,8 @@ export default {
// 表单校验
rules: {
userName: [
- { required: true, message: "用户名称不能为空", trigger: "blur" }
+ { required: true, message: "用户名称不能为空", trigger: "blur" },
+ { pattern: /^[^\u4e00-\u9fa5]+$/, message: "用户名称不能包含中文", trigger: "blur" }
],
nickName: [
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
@@ -435,10 +346,10 @@ export default {
getList() {
this.loading = true;
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.userList = response.rows;
- this.total = response.total;
- this.loading = false;
- }
+ this.userList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ }
);
},
/** 查询部门下拉树结构 */
@@ -461,16 +372,16 @@ export default {
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用";
this.$confirm('确认要"' + text + '""' + row.userName + '"用户吗?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return changeUserStatus(row.userId, row.status);
- }).then(() => {
- this.msgSuccess(text + "成功");
- }).catch(function() {
- row.status = row.status === "0" ? "1" : "0";
- });
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(function () {
+ return changeUserStatus(row.userId, row.status);
+ }).then(() => {
+ this.msgSuccess(text + "成功");
+ }).catch(function () {
+ row.status = row.status === "0" ? "1" : "0";
+ });
},
// 取消按钮
cancel() {
@@ -479,6 +390,7 @@ export default {
},
// 表单重置
reset() {
+ console.log(this.sexOptions[0]);
this.form = {
userId: undefined,
deptId: undefined,
@@ -487,8 +399,9 @@ export default {
password: undefined,
phonenumber: undefined,
email: undefined,
- sex: undefined,
+ sex: this.sexOptions[0].dictValue,
status: "0",
+ type: '1',
remark: undefined,
postIds: [],
roleIds: []
@@ -546,13 +459,13 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(({ value }) => {
- resetUserPwd(row.userId, value).then(response => {
- this.msgSuccess("修改成功,新密码是:" + value);
- });
- }).catch(() => {});
+ resetUserPwd(row.userId, value).then(response => {
+ this.msgSuccess("修改成功,新密码是:" + value);
+ });
+ }).catch(() => { });
},
/** 提交按钮 */
- submitForm: function() {
+ submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.userId != undefined) {
@@ -575,28 +488,28 @@ export default {
handleDelete(row) {
const userIds = row.userId || this.ids;
this.$confirm('是否确认删除用户编号为"' + userIds + '"的数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return delUser(userIds);
- }).then(() => {
- this.getList();
- this.msgSuccess("删除成功");
- })
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(function () {
+ return delUser(userIds);
+ }).then(() => {
+ this.getList();
+ this.msgSuccess("删除成功");
+ })
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有用户数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return exportUser(queryParams);
- }).then(response => {
- this.download(response.msg);
- })
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(function () {
+ return exportUser(queryParams);
+ }).then(response => {
+ this.download(response.msg);
+ })
},
/** 导入按钮操作 */
handleImport() {
diff --git a/src/views/testModule/index.vue b/src/views/testModule/index.vue
new file mode 100644
index 0000000..51821df
--- /dev/null
+++ b/src/views/testModule/index.vue
@@ -0,0 +1,28 @@
+
+
+
表单模块测试
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/trainService/courseManage.vue b/src/views/trainService/courseManage.vue
index 2dde15c..83a125f 100644
--- a/src/views/trainService/courseManage.vue
+++ b/src/views/trainService/courseManage.vue
@@ -4,12 +4,19 @@
style="display: flex; margin-left: 5px">
新增课程
+
+
+
-
+
-
+
+
搜索
@@ -17,13 +24,23 @@
-
+
+
+
+
+
-
+
+
+ {{ scope.row.classType == 4 ? scope.row.dateTime : '' }}
+
+
+
@@ -31,18 +48,23 @@
-
+
{{
- scope.row.signIn
- }}
+ scope.row.classType == 4 ? '' : scope.row.signIn
+ }}
修改
删除
- 签到
+ 签到
+ 收入管理
+ 学习人数
@@ -55,13 +77,25 @@
+