Commit f061c5c0 by xinlaa

删除已开放页面多余代码

1 parent 0f17076f
...@@ -214,7 +214,8 @@ export default { ...@@ -214,7 +214,8 @@ export default {
); );
this.dialogVisibleDepart = true; this.dialogVisibleDepart = true;
}, },
submitDepart() { departRemove() {},
departSubmit() {
api[this.formDepart.id ? "updateDepart" : "addDepart"](this.formDepart) api[this.formDepart.id ? "updateDepart" : "addDepart"](this.formDepart)
.then(() => { .then(() => {
this.msgSuccess("操作成功"); this.msgSuccess("操作成功");
...@@ -324,6 +325,12 @@ export default { ...@@ -324,6 +325,12 @@ export default {
v-hasPermi="['contacts:organization:addDep']" v-hasPermi="['contacts:organization:addDep']"
@click.stop="departEdit(data, 0)" @click.stop="departEdit(data, 0)"
></i> ></i>
<i
class="el-icon-delete"
v-hasPermi="['contacts:organization:removeDep']"
v-if="node.level !== 1"
@click.stop="departRemove(data)"
></i>
</span> </span>
</div> </div>
</el-tree> </el-tree>
...@@ -509,7 +516,7 @@ export default { ...@@ -509,7 +516,7 @@ export default {
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button @click="dialogVisibleDepart = false">取 消</el-button> <el-button @click="dialogVisibleDepart = false">取 消</el-button>
<el-button type="primary" @click="submitDepart">确 定</el-button> <el-button type="primary" @click="departSubmit">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
......
...@@ -205,12 +205,6 @@ export default { ...@@ -205,12 +205,6 @@ export default {
this.dateRange = []; this.dateRange = [];
this.$refs["queryForm"].resetFields(); this.$refs["queryForm"].resetFields();
}, },
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
},
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.multipleSelection = selection; this.multipleSelection = selection;
......
...@@ -90,16 +90,6 @@ export default { ...@@ -90,16 +90,6 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
submitForm(formName) {
this.$refs["form"].validate((valid) => {
if (valid) {
alert("submit!");
} else {
console.log("error submit!!");
return false;
}
});
},
resetForm(formName) { resetForm(formName) {
this.dateRange = []; this.dateRange = [];
this.$refs["queryForm"].resetFields(); this.$refs["queryForm"].resetFields();
......
...@@ -21,20 +21,10 @@ export default { ...@@ -21,20 +21,10 @@ export default {
ids: [], ids: [],
// 非多个禁用 // 非多个禁用
multiple: true, multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 表格数据 // 表格数据
list: [], list: [],
// 是否显示弹出层
open: false,
// 类型数据字典
typeOptions: [],
// 类型数据字典
statusOptions: [],
// 表单参数
form: {},
}; };
}, },
created() { created() {
...@@ -82,58 +72,21 @@ export default { ...@@ -82,58 +72,21 @@ export default {
this.ids = selection.map((item) => item.id); this.ids = selection.map((item) => item.id);
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
/** 删除按钮操作 */
handleDelete(row) {
const operIds = row.operId || this.ids;
this.$confirm(
'是否确认删除日志编号为"' + operIds + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return delOperlog(operIds);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
},
/** 清空按钮操作 */
handleClean() {
this.$confirm("是否确认清空所有操作日志数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return cleanOperlog();
})
.then(() => {
this.getList();
this.msgSuccess("清空成功");
})
.catch(function () {});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const query = this.query; // const query = this.query;
this.$confirm("是否确认导出所有数据项?", "警告", { // this.$confirm("是否确认导出所有数据项?", "警告", {
confirmButtonText: "确定", // confirmButtonText: "确定",
cancelButtonText: "取消", // cancelButtonText: "取消",
type: "warning", // type: "warning",
}) // })
.then(function () { // .then(function () {
return exportOperlog(query); // return exportOperlog(query);
}) // })
.then((response) => { // .then((response) => {
this.download(response.msg); // this.download(response.msg);
}) // })
.catch(function () {}); // .catch(function () {});
}, },
}, },
}; };
...@@ -141,14 +94,7 @@ export default { ...@@ -141,14 +94,7 @@ export default {
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form :model="query" ref="queryForm" :inline="true" class="top-search" label-width="80px">
:model="query"
ref="queryForm"
:inline="true"
v-show="showSearch"
class="top-search"
label-width="80px"
>
<el-form-item label="群名"> <el-form-item label="群名">
<el-input v-model="query.groupName" placeholder="请输入群名" clearable /> <el-input v-model="query.groupName" placeholder="请输入群名" clearable />
</el-form-item> </el-form-item>
......
...@@ -11,20 +11,10 @@ export default { ...@@ -11,20 +11,10 @@ export default {
ids: [], ids: [],
// 非多个禁用 // 非多个禁用
multiple: true, multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 表格数据 // 表格数据
list: [], list: [],
// 是否显示弹出层
open: false,
// 类型数据字典
typeOptions: [],
// 类型数据字典
statusOptions: [],
// 日期范围
dateRange: [],
// 群信息 // 群信息
group: {}, group: {},
// 查询参数 // 查询参数
...@@ -61,64 +51,6 @@ export default { ...@@ -61,64 +51,6 @@ export default {
this.ids = selection.map((item) => item.operId); this.ids = selection.map((item) => item.operId);
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
/** 详细按钮操作 */
handleView(row) {
this.open = true;
this.form = row;
},
/** 删除按钮操作 */
handleDelete(row) {
const operIds = row.operId || this.ids;
this.$confirm(
'是否确认删除日志编号为"' + operIds + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return delOperlog(operIds);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
},
/** 清空按钮操作 */
handleClean() {
this.$confirm("是否确认清空所有操作日志数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return cleanOperlog();
})
.then(() => {
this.getList();
this.msgSuccess("清空成功");
})
.catch(function () {});
},
/** 导出按钮操作 */
handleExport() {
const query = this.query;
this.$confirm("是否确认导出所有操作日志数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportOperlog(query);
})
.then((response) => {
this.download(response.msg);
})
.catch(function () {});
},
}, },
}; };
</script> </script>
......
...@@ -31,20 +31,10 @@ export default { ...@@ -31,20 +31,10 @@ export default {
ids: [], ids: [],
// 非多个禁用 // 非多个禁用
multiple: true, multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 表格数据 // 表格数据
list: [], list: [],
// 是否显示弹出层
open: false,
// 类型数据字典
typeOptions: [],
// 类型数据字典
statusOptions: [],
// 日期范围
dateRange: [],
}; };
}, },
created() { created() {
...@@ -84,35 +74,11 @@ export default { ...@@ -84,35 +74,11 @@ export default {
this.getList(); this.getList();
}); });
}, },
// 操作日志状态字典翻译
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
// 操作日志类型字典翻译
typeFormat(row, column) {
return this.selectDictLabel(this.typeOptions, row.businessType);
},
/** 搜索按钮操作 */
handleQuery() {
this.query.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.groupId); this.ids = selection.map((item) => item.groupId);
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
/** 详细按钮操作 */
handleView(row) {
this.open = true;
this.form = row;
},
/** 删除按钮操作 */ /** 删除按钮操作 */
remove(id) { remove(id) {
const operIds = id || this.ids + ""; const operIds = id || this.ids + "";
...@@ -127,38 +93,6 @@ export default { ...@@ -127,38 +93,6 @@ export default {
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}); });
}, },
/** 清空按钮操作 */
handleClean() {
this.$confirm("是否确认清空所有操作日志数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return cleanOperlog();
})
.then(() => {
this.getList();
this.msgSuccess("清空成功");
})
.catch(function () {});
},
/** 导出按钮操作 */
handleExport() {
const query = this.query;
this.$confirm("是否确认导出所有操作日志数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportOperlog(query);
})
.then((response) => {
this.download(response.msg);
})
.catch(function () {});
},
}, },
}; };
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!