|
|
@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<a-card :bordered="false" :bodyStyle="tstyle">
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
|
|
|
class="table-page-search-wrapper"
|
|
|
|
|
|
|
|
v-if="hasPerm('BookingTemplate:page')"
|
|
|
|
|
|
|
|
:class="advanced ? 'Open' : 'Close'"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<a-form layout="inline">
|
|
|
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
|
|
|
<a-col :md="18">
|
|
|
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
|
|
|
<a-col :md="8" :sm="24" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`">
|
|
|
|
|
|
|
|
<a-form-item :label="item.title">
|
|
|
|
|
|
|
|
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
|
|
|
|
|
<a-button type="primary" @click="FnGetData">查询</a-button>
|
|
|
|
|
|
|
|
<a-button style="margin-left: 8px" @click="init">重置</a-button>
|
|
|
|
|
|
|
|
<a @click="toggleAdvanced" style="margin-left: 8px">
|
|
|
|
|
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
|
|
|
|
|
<a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
</a-form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</a-card>
|
|
|
|
|
|
|
|
<a-card :bordered="false">
|
|
|
|
|
|
|
|
<vxe-toolbar>
|
|
|
|
|
|
|
|
<template #buttons>
|
|
|
|
|
|
|
|
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">
|
|
|
|
|
|
|
|
新增账号
|
|
|
|
|
|
|
|
</a-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-toolbar>
|
|
|
|
|
|
|
|
<vxe-table :data="loadData" border :loading="loading" empty-text="没有更多数据了!">
|
|
|
|
|
|
|
|
<vxe-column type="seq" width="40" fixed="left"></vxe-column>
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
|
|
|
|
v-for="item in columns"
|
|
|
|
|
|
|
|
:key="`${item.dataIndex}3`"
|
|
|
|
|
|
|
|
:field="item.dataIndex"
|
|
|
|
|
|
|
|
:min-width="item.width"
|
|
|
|
|
|
|
|
:title="item.title"
|
|
|
|
|
|
|
|
:align="item.align"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #default="{ row }" v-if="item.title == '类型'">
|
|
|
|
|
|
|
|
<span>{{ FnTurnD(row.typeCode) }}</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
<vxe-column title="操作" fixed="right" width="200" align="center">
|
|
|
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
|
|
|
|
<vxe-button type="text" @click="$refs.editForm.edit(row)">编辑</vxe-button>
|
|
|
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
|
|
|
title="请确认删除?"
|
|
|
|
|
|
|
|
ok-text="是"
|
|
|
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
|
|
|
@confirm="
|
|
|
|
|
|
|
|
e => {
|
|
|
|
|
|
|
|
confirm(e, row)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<vxe-button type="text">删除</vxe-button>
|
|
|
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
</vxe-table>
|
|
|
|
|
|
|
|
<vxe-pager
|
|
|
|
|
|
|
|
:loading="loading"
|
|
|
|
|
|
|
|
:current-page="queryParam.currentPage"
|
|
|
|
|
|
|
|
:page-size="queryParam.pageSize"
|
|
|
|
|
|
|
|
:total="queryParam.totalResult"
|
|
|
|
|
|
|
|
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
|
|
|
|
|
|
@page-change="handlePageChange"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</vxe-pager>
|
|
|
|
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
|
|
|
|
</a-card>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import { DjyWebsiteAccountConfigPage, DjyWebsiteAccountConfigDelete } from '@/api/modular/main/WebSiteaccount'
|
|
|
|
|
|
|
|
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
|
|
|
|
|
|
|
|
import addForm from './addForm.vue'
|
|
|
|
|
|
|
|
import editForm from './editForm.vue'
|
|
|
|
|
|
|
|
import columnSetting from '@/components/tableColumnSetting'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
components: {
|
|
|
|
|
|
|
|
addForm,
|
|
|
|
|
|
|
|
editForm,
|
|
|
|
|
|
|
|
columnSetting
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
TypeData: [],
|
|
|
|
|
|
|
|
// 高级搜索 展开/关闭
|
|
|
|
|
|
|
|
advanced: false,
|
|
|
|
|
|
|
|
loading: false,
|
|
|
|
|
|
|
|
setVisible: false,
|
|
|
|
|
|
|
|
setVisible1: false,
|
|
|
|
|
|
|
|
queryParam: {
|
|
|
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
totalResult: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
ColumnsQuery: [],
|
|
|
|
|
|
|
|
columns: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '类型',
|
|
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
|
|
width: '100',
|
|
|
|
|
|
|
|
dataIndex: 'typeCode'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '账号',
|
|
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
|
|
width: '80',
|
|
|
|
|
|
|
|
dataIndex: 'account'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '密码',
|
|
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
|
|
width: '80',
|
|
|
|
|
|
|
|
dataIndex: 'password'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '备注',
|
|
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
|
|
width: '80',
|
|
|
|
|
|
|
|
dataIndex: 'remark'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
|
|
|
|
|
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
|
|
|
|
|
loadData: {}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
|
|
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '349716496130117' }).then(res => {
|
|
|
|
|
|
|
|
this.TypeData = res.data.rows
|
|
|
|
|
|
|
|
console.log(this.TypeData)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
FnTurnD(data) {
|
|
|
|
|
|
|
|
let Rdata = ''
|
|
|
|
|
|
|
|
this.TypeData.forEach(item => {
|
|
|
|
|
|
|
|
if (item.code == data) {
|
|
|
|
|
|
|
|
Rdata = item.value
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return Rdata
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
toggleAdvanced() {
|
|
|
|
|
|
|
|
this.advanced = !this.advanced
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
init() {
|
|
|
|
|
|
|
|
Object.assign(this.$data, this.$options.data())
|
|
|
|
|
|
|
|
this.ColumnsQuery = this.columns
|
|
|
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handlePageChange({ currentPage, pageSize }) {
|
|
|
|
|
|
|
|
this.queryParam.pageNo = currentPage
|
|
|
|
|
|
|
|
this.queryParam.pageSize = pageSize
|
|
|
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
FnGetData() {
|
|
|
|
|
|
|
|
this.loading = true
|
|
|
|
|
|
|
|
DjyWebsiteAccountConfigPage(this.queryParam).then(res => {
|
|
|
|
|
|
|
|
this.loadData = res.data.rows
|
|
|
|
|
|
|
|
this.loading = false
|
|
|
|
|
|
|
|
this.queryParam.currentPage = res.data.pageNo
|
|
|
|
|
|
|
|
this.queryParam.pageSize = res.data.pageSize
|
|
|
|
|
|
|
|
this.queryParam.totalResult = res.data.totalRows
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 查询参数组装
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
switchingDate() {
|
|
|
|
|
|
|
|
const obj = JSON.parse(JSON.stringify(this.queryParam))
|
|
|
|
|
|
|
|
return obj
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
confirm(e, data) {
|
|
|
|
|
|
|
|
this.DjyWebsiteAccountConfigDelete(data)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
DjyWebsiteAccountConfigDelete(record) {
|
|
|
|
|
|
|
|
DjyWebsiteAccountConfigDelete(record).then(res => {
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(`删除失败,${res.message}`)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleOk() {
|
|
|
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
|
|
|
.table-operator {
|
|
|
|
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
button {
|
|
|
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.Open {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.Close {
|
|
|
|
|
|
|
|
height: 45px;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|