Commit 53f8b625 authored by Your Name's avatar Your Name

修改机顶盒页面说明

parent 3832a5e8
<template> <template>
<!-- 统计用户管理 --> <!-- 统计用户管理 -->
<div class="user-wrapper height100"> <div class="user-wrapper height100">
<div class="search-container"> <div class="search-container">
<el-form :inline="true" :model="form"> <el-form :inline="true" :model="form">
<el-form-item> <el-form-item>
<el-input <el-input
v-model="form.userName" v-model="form.userName"
placeholder="请输入用户名" placeholder="请输入用户名"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select <el-select
v-model="form.status" v-model="form.status"
placeholder="请选择账号状态" placeholder="请选择账号状态"
clearable clearable
> >
<el-option <el-option
v-for="item in statusOption" v-for="item in statusOption"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="btn-group"> <div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button> <el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button> <el-button @click="handleReset">重置</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="page-tip"> <div class="page-tip">
<span class="page-tip-title">页面说明:</span> <span class="page-tip-title">页面说明:</span>
<span class="page-tips" <span class="page-tips"
>可按按照用户名及账号状态进行信息筛选。可新增统计账号,“*”为必填项。</span >可按照用户名及账号状态进行信息筛选。可新增统计账号,“*”为必填项。</span
> >
</div> </div>
</div> </div>
<div class="table-content"> <div class="table-content">
<div class="btn-group"> <div class="btn-group">
<el-button type="primary" @click="handleAdd">新建统计账号</el-button> <el-button type="primary" @click="handleAdd">新建统计账号</el-button>
</div> </div>
<account-table <account-table
:feildList="feildList" :feildList="feildList"
:list="list" :list="list"
@action="handleAction" @action="handleAction"
:currentPage="page._index" :currentPage="page._index"
/> />
<party-pagination :page="page" @changePage="handleChangeCurrent" /> <party-pagination :page="page" @changePage="handleChangeCurrent" />
</div> </div>
<add-dialog ref="addDialog" @success="getPageList()" /> <add-dialog ref="addDialog" @success="getPageList()" />
<edit-dialog ref="editDialog" @success="getPageList()" /> <edit-dialog ref="editDialog" @success="getPageList()" />
<msg-dialog ref="msgDilaog" :msgInfo="msgInfo" /> <msg-dialog ref="msgDilaog" :msgInfo="msgInfo" />
</div> </div>
</template> </template>
<script> <script>
import { partyPagination } from "@/components/index"; import { partyPagination } from "@/components/index";
import accountTable from "./components/accountTable"; import accountTable from "./components/accountTable";
import { addDialog, editDialog } from "./statisticalDialog/index"; import { addDialog, editDialog } from "./statisticalDialog/index";
import msgDialog from "./msgDialog.vue"; import msgDialog from "./msgDialog.vue";
import { statusOption } from "@/config/account"; import { statusOption } from "@/config/account";
export default { export default {
data() { data() {
return { return {
form: { form: {
userName: "", userName: "",
status: "", status: "",
type: 5, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 5. 统计账号 type: 5, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 5. 统计账号
}, },
statusOption: statusOption, statusOption: statusOption,
feildList: [ feildList: [
{ prop: "userName", label: "统计用户名" }, { prop: "userName", label: "统计用户名" },
{ prop: "orgName", label: "所属单位" }, { prop: "orgName", label: "所属单位" },
{ prop: "exiredDate", label: "到期时间" }, { prop: "exiredDate", label: "到期时间" },
{ prop: "statusName", label: "账号状态" }, { prop: "statusName", label: "账号状态" },
{ prop: "", label: "操作", isEdit: true, width: 280 }, { prop: "", label: "操作", isEdit: true, width: 280 },
], ],
list: [], list: [],
page: { page: {
_index: 1, _index: 1,
_size: 10, _size: 10,
total: 0, total: 0,
}, },
activeRow: {}, activeRow: {},
msgInfo: {}, msgInfo: {},
}; };
}, },
components: { components: {
partyPagination, partyPagination,
accountTable, accountTable,
addDialog, addDialog,
editDialog, editDialog,
msgDialog, msgDialog,
}, },
mounted() { mounted() {
this.getFirstPageList(); this.getFirstPageList();
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.getFirstPageList(); this.getFirstPageList();
}, },
handleReset() { handleReset() {
this.form.userName = ""; this.form.userName = "";
this.form.status = ""; this.form.status = "";
this.getFirstPageList(); this.getFirstPageList();
}, },
getFirstPageList() { getFirstPageList() {
this.page._index = 1; this.page._index = 1;
this.getPageList(); this.getPageList();
}, },
getPageList() { getPageList() {
let requestParams = {}; let requestParams = {};
requestParams._index = this.page._index; requestParams._index = this.page._index;
requestParams._size = this.page._size; requestParams._size = this.page._size;
requestParams.type = this.form.type; requestParams.type = this.form.type;
if (this.form.userName) { if (this.form.userName) {
requestParams.userName = this.form.userName; requestParams.userName = this.form.userName;
} }
if (this.form.status) { if (this.form.status) {
requestParams.status = this.form.status; requestParams.status = this.form.status;
} }
this.$https( this.$https(
{ {
method: "get", method: "get",
url: "tUser/getPageList", url: "tUser/getPageList",
authType: this.backToken, authType: this.backToken,
}, },
requestParams requestParams
) )
.then((res) => { .then((res) => {
if (res.status != 200) { if (res.status != 200) {
this.getResWithOutData(); this.getResWithOutData();
} else { } else {
if (res.data.resultCode == 200) { if (res.data.resultCode == 200) {
this.list = res.data.data.records; this.list = res.data.data.records;
this.page._size = res.data.data.size; this.page._size = res.data.data.size;
this.page.total = res.data.data.total; this.page.total = res.data.data.total;
} else { } else {
this.getResWithOutData(); this.getResWithOutData();
} }
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
}, },
// 页面返回值为空 // 页面返回值为空
getResWithOutData() { getResWithOutData() {
this.list = []; this.list = [];
this.page = { this.page = {
_index: 1, _index: 1,
_size: 10, _size: 10,
total: 0, total: 0,
}; };
}, },
// 新增账号 // 新增账号
handleAdd() { handleAdd() {
this.$refs.addDialog.dialogVisible = true; this.$refs.addDialog.dialogVisible = true;
}, },
// 编辑 // 编辑
handleEdit() { handleEdit() {
this.$refs.editDialog.id = this.activeRow.id; this.$refs.editDialog.id = this.activeRow.id;
this.$refs.editDialog.getDetailById(); this.$refs.editDialog.getDetailById();
this.$refs.editDialog.dialogVisible = true; this.$refs.editDialog.dialogVisible = true;
}, },
// 重置密码 // 重置密码
handleResetPwd() { handleResetPwd() {
let _this = this; let _this = this;
this.$https({ this.$https({
method: "put", method: "put",
url: `tUser/resetPassword?userId=${this.activeRow.id}`, url: `tUser/resetPassword?userId=${this.activeRow.id}`,
authType: this.backToken, authType: this.backToken,
}) })
.then((res) => { .then((res) => {
if (res.status != 200) { if (res.status != 200) {
_this.$message.error(res.data.message); _this.$message.error(res.data.message);
} else { } else {
if (res.data.resultCode == 200) { if (res.data.resultCode == 200) {
_this.msgInfo = { _this.msgInfo = {
type: "success", type: "success",
des: `用户${this.activeRow.userName}密码已重置!`, des: `用户${this.activeRow.userName}密码已重置!`,
}; };
_this.$refs.msgDilaog.dialogVisible = true; _this.$refs.msgDilaog.dialogVisible = true;
} else { } else {
_this.$message.error(res.data.message); _this.$message.error(res.data.message);
} }
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
}, },
// 禁用 // 禁用
handleDisable() { handleDisable() {
let _this = this; let _this = this;
this.$https({ this.$https({
method: "put", method: "put",
url: `tUser/disable?userId=${this.activeRow.id}`, url: `tUser/disable?userId=${this.activeRow.id}`,
authType: this.backToken, authType: this.backToken,
}) })
.then((res) => { .then((res) => {
if (res.status != 200) { if (res.status != 200) {
_this.$message.error(res.data.message); _this.$message.error(res.data.message);
} else { } else {
if (res.data.resultCode == 200) { if (res.data.resultCode == 200) {
_this.msgInfo = { _this.msgInfo = {
type: "wait", type: "wait",
des: `${this.activeRow.userName}账号禁用申请已提交,待审核…`, des: `${this.activeRow.userName}账号禁用申请已提交,待审核…`,
}; };
_this.$refs.msgDilaog.dialogVisible = true; _this.$refs.msgDilaog.dialogVisible = true;
_this.getPageList(); _this.getPageList();
} else { } else {
_this.$message.error(res.data.message); _this.$message.error(res.data.message);
} }
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
}, },
// 激活 // 激活
handleActive() { handleActive() {
let _this = this; let _this = this;
this.$https({ this.$https({
method: "put", method: "put",
url: `tUser/enable?userId=${this.activeRow.id}`, url: `tUser/enable?userId=${this.activeRow.id}`,
authType: this.backToken, authType: this.backToken,
}) })
.then((res) => { .then((res) => {
if (res.status != 200) { if (res.status != 200) {
_this.$message.error(res.data.message); _this.$message.error(res.data.message);
} else { } else {
if (res.data.resultCode == 200) { if (res.data.resultCode == 200) {
_this.msgInfo = { _this.msgInfo = {
type: "success", type: "success",
des: `用户${this.activeRow.userName}账号激活成功!`, des: `用户${this.activeRow.userName}账号激活成功!`,
}; };
_this.$refs.msgDilaog.dialogVisible = true; _this.$refs.msgDilaog.dialogVisible = true;
_this.getPageList(); _this.getPageList();
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
}, },
handleAction(params) { handleAction(params) {
this.activeRow = params.row; this.activeRow = params.row;
switch (params.type) { switch (params.type) {
case "enable": case "enable":
this.handleActive(); this.handleActive();
break; break;
case "disable": case "disable":
this.handleDisable(); this.handleDisable();
break; break;
case "reset": case "reset":
this.handleResetPwd(); this.handleResetPwd();
break; break;
case "edit": case "edit":
this.handleEdit(); this.handleEdit();
break; break;
default: default:
break; break;
} }
}, },
// 翻页 // 翻页
handleChangeCurrent(val) { handleChangeCurrent(val) {
this.page._index = val; this.page._index = val;
this.getPageList(); this.getPageList();
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment