|
|
|
@ -1,179 +0,0 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<a-card :bordered="false" :bodyStyle="tstyle">
|
|
|
|
|
<div class="table-page-search-wrapper" :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">
|
|
|
|
|
<a-form-item label="用户:">
|
|
|
|
|
<a-select placeholder="请选择用户" v-model="queryParam.userId">
|
|
|
|
|
<a-select-option v-for="item in UserList" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</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" height="600px" empty-text="没有更多数据了!">
|
|
|
|
|
<vxe-column type="seq" width="50" 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"
|
|
|
|
|
:show-overflow="true"
|
|
|
|
|
>
|
|
|
|
|
</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="confirm(row)">
|
|
|
|
|
<vxe-button type="text">删除</vxe-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
</vxe-table>
|
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
|
</a-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
BookingTemplateGetPrinttemplateRightList,
|
|
|
|
|
BookingPrintTemplateDeletePrinttemplateRight,
|
|
|
|
|
SysUserGetTenantUser
|
|
|
|
|
} from '@/api/modular/main/PrinttemplateRight'
|
|
|
|
|
import addForm from './addForm.vue'
|
|
|
|
|
import editForm from './editForm.vue'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addForm,
|
|
|
|
|
editForm
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
TypeData: [],
|
|
|
|
|
// 高级搜索 展开/关闭
|
|
|
|
|
advanced: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
setVisible: false,
|
|
|
|
|
setVisible1: false,
|
|
|
|
|
queryParam: {
|
|
|
|
|
// currentPage: 1,
|
|
|
|
|
// pageSize: 10,
|
|
|
|
|
// totalResult: 1
|
|
|
|
|
},
|
|
|
|
|
ColumnsQuery: [],
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
title: '文件名称',
|
|
|
|
|
align: 'center',
|
|
|
|
|
dataIndex: 'fileName'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '类型名称',
|
|
|
|
|
align: 'center',
|
|
|
|
|
dataIndex: 'typeName'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '用户名称',
|
|
|
|
|
align: 'center',
|
|
|
|
|
dataIndex: 'userName'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
|
|
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
|
|
loadData: [],
|
|
|
|
|
CodeData: [],
|
|
|
|
|
WCodeData: [],
|
|
|
|
|
ModulesData: [],
|
|
|
|
|
carrierCodeData: [],
|
|
|
|
|
UserList: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.init()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
confirm(e) {
|
|
|
|
|
this.FnDel(e)
|
|
|
|
|
},
|
|
|
|
|
FnDel(data) {
|
|
|
|
|
BookingPrintTemplateDeletePrinttemplateRight({ Ids: data.id }).then(res => {
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
toggleAdvanced() {
|
|
|
|
|
this.advanced = !this.advanced
|
|
|
|
|
},
|
|
|
|
|
init() {
|
|
|
|
|
Object.assign(this.$data, this.$options.data())
|
|
|
|
|
this.ColumnsQuery = this.columns
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
SysUserGetTenantUser().then(res => {
|
|
|
|
|
this.UserList = res.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
FnGetData() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
BookingTemplateGetPrinttemplateRightList(this.queryParam).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.loadData = res.data
|
|
|
|
|
} else {
|
|
|
|
|
this.loadData = []
|
|
|
|
|
this.$message.warning(res.message)
|
|
|
|
|
}
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleOk() {
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.table-operator {
|
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button {
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
|
|
|
|
.Open {
|
|
|
|
|
}
|
|
|
|
|
.Close {
|
|
|
|
|
height: 45px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
</style>
|