You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
210 lines
4.9 KiB
210 lines
4.9 KiB
|
6 years ago
|
<template>
|
||
|
|
<div class="registerList">
|
||
|
|
<el-card shadow="never"
|
||
|
|
class="aui-card--fill">
|
||
|
|
<div class="mod-demo__demo}">
|
||
|
|
<el-form :inline="true"
|
||
|
|
:model="dataForm"
|
||
|
6 years ago
|
@keyup.enter.native="loadData()">
|
||
|
6 years ago
|
<el-form-item>
|
||
|
|
<el-input v-model="dataForm.name"
|
||
|
|
placeholder="组织名称">
|
||
|
|
</el-input>
|
||
|
|
</el-form-item>
|
||
|
|
|
||
|
|
<el-form-item>
|
||
|
6 years ago
|
<el-button @click="loadData()">查询</el-button>
|
||
|
6 years ago
|
</el-form-item>
|
||
|
|
</el-form>
|
||
|
|
|
||
|
5 years ago
|
<c-table column-type=""
|
||
|
6 years ago
|
ref="table"
|
||
|
|
:url="tableUrl"
|
||
|
6 years ago
|
:params="tableParams"
|
||
|
|
keyword="RegisterInfo"
|
||
|
|
:operations="operations"
|
||
|
|
:tableHeight="tableHeight"
|
||
|
5 years ago
|
@init="init">
|
||
|
6 years ago
|
</c-table>
|
||
|
6 years ago
|
</div>
|
||
|
|
</el-card>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
6 years ago
|
import CTable from '@c/CTable'
|
||
|
6 years ago
|
import { mapGetters } from 'vuex'
|
||
|
5 years ago
|
import { Loading } from 'element-ui' // 引入Loading服务
|
||
|
|
|
||
|
|
let loading // 加载动画
|
||
|
6 years ago
|
export default {
|
||
|
|
data () {
|
||
|
|
return {
|
||
|
|
dataForm: {
|
||
|
|
name: '' // 组织名称
|
||
|
|
},
|
||
|
6 years ago
|
// 列表相关
|
||
|
5 years ago
|
tableUrl:
|
||
|
|
'https://epmet-cloud.elinkservice.cn/api/third/pacustomer/registerinfo',
|
||
|
6 years ago
|
// tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/pacustomer/registerinfo',
|
||
|
6 years ago
|
tableParams: {
|
||
|
5 years ago
|
source: this.env
|
||
|
6 years ago
|
},
|
||
|
|
// 列表操作栏的操作项数组
|
||
|
6 years ago
|
operations: [
|
||
|
|
{
|
||
|
|
lable: '初始化', // 按钮显示名称
|
||
|
|
size: 'mini',
|
||
|
|
style: 'margin: 0 6px;',
|
||
|
|
type: 'text',
|
||
|
|
slot: '',
|
||
|
|
plain: false,
|
||
|
|
methodName: 'init', // 回调方法名称
|
||
|
5 years ago
|
isShow: (row) => {
|
||
|
|
if (
|
||
|
|
row.initState === 0 &&
|
||
|
|
row.resiAuth === 1 &&
|
||
|
|
row.workAuth === 1
|
||
|
|
) {
|
||
|
6 years ago
|
return true
|
||
|
|
} else {
|
||
|
|
return false
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
],
|
||
|
6 years ago
|
// 查询栏下拉框数据
|
||
|
5 years ago
|
optionData: {
|
||
|
6 years ago
|
client: [
|
||
|
|
{
|
||
|
|
value: '01',
|
||
|
|
label: '市北区政府'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
value: '02',
|
||
|
|
label: '市南区政府'
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
|
||
|
|
// 列表数据
|
||
|
|
tableData: [
|
||
|
|
{
|
||
|
|
name: '市北区政府',
|
||
|
|
level: '市区级',
|
||
|
|
location: '青岛市市北区上清路2号',
|
||
|
|
partyNum: '2',
|
||
|
|
resi: '未授权',
|
||
|
|
work: '已授权'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '市南区政府',
|
||
|
|
level: '市区级',
|
||
|
|
location: '青岛市市南区上清路2号',
|
||
|
|
partyNum: '2',
|
||
|
|
resi: '已授权',
|
||
|
|
work: '已授权'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '李沧区政府',
|
||
|
|
level: '市区级',
|
||
|
|
location: '青岛市李沧区黑龙江中路629号',
|
||
|
|
partyNum: '2',
|
||
|
|
resi: '未授权',
|
||
|
|
work: '未授权'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '城阳区政府',
|
||
|
|
level: '市区级',
|
||
|
|
location: '青岛市市北区上清路2号',
|
||
|
|
partyNum: '2',
|
||
|
|
resi: '未授权',
|
||
|
|
work: '已授权'
|
||
|
|
}
|
||
|
5 years ago
|
],
|
||
|
6 years ago
|
|
||
|
5 years ago
|
// 初始化相关
|
||
|
|
initUrl: '/oper/crm/customer/init'
|
||
|
6 years ago
|
}
|
||
|
|
},
|
||
|
|
components: {
|
||
|
|
CTable
|
||
|
|
},
|
||
|
|
activated () {
|
||
|
|
this.$nextTick(() => {
|
||
|
|
this.$refs.table.doLayout() // 解决表格错位
|
||
|
|
})
|
||
|
|
},
|
||
|
|
mounted () {
|
||
|
5 years ago
|
this.tableParams.source = this.env
|
||
|
|
// eslint-disable-next-line
|
||
|
6 years ago
|
this.loadData()
|
||
|
6 years ago
|
},
|
||
|
|
computed: {
|
||
|
|
tableHeight () {
|
||
|
|
return this.clientHeight - 60 - 80 - 80 - 50
|
||
|
|
},
|
||
|
5 years ago
|
...mapGetters(['clientHeight', 'env'])
|
||
|
6 years ago
|
},
|
||
|
|
methods: {
|
||
|
6 years ago
|
// 获取列表数据
|
||
|
|
loadData () {
|
||
|
|
this.$refs.table.loadData()
|
||
|
|
},
|
||
|
|
// 客户初始化
|
||
|
5 years ago
|
init (row) {
|
||
|
5 years ago
|
this.startLoading()
|
||
|
5 years ago
|
const param = {
|
||
|
|
customerId: row.customerId
|
||
|
|
}
|
||
|
5 years ago
|
window.app.ajax.post(
|
||
|
|
this.initUrl,
|
||
|
|
param,
|
||
|
5 years ago
|
(data, rspMsg) => {
|
||
|
5 years ago
|
this.endLoading()
|
||
|
5 years ago
|
this.$message.success('初始化成功')
|
||
|
|
this.loadData()
|
||
|
|
// eslint-disable-next-line
|
||
|
|
},
|
||
|
|
(rspMsg, data) => {
|
||
|
5 years ago
|
this.endLoading()
|
||
|
5 years ago
|
this.$message.error(rspMsg)
|
||
|
5 years ago
|
}
|
||
|
|
)
|
||
|
6 years ago
|
},
|
||
|
5 years ago
|
|
||
|
5 years ago
|
// 开启加载动画
|
||
|
|
startLoading () {
|
||
|
|
loading = Loading.service({
|
||
|
|
lock: true, // 是否锁定
|
||
|
|
text: '正在加载……', // 加载中需要显示的文字
|
||
|
|
background: 'rgba(0,0,0,.7)' // 背景颜色
|
||
|
|
})
|
||
|
|
},
|
||
|
|
// 结束加载动画
|
||
|
|
endLoading () {
|
||
|
|
// clearTimeout(timer);
|
||
|
|
if (loading) {
|
||
|
|
loading.close()
|
||
|
|
}
|
||
|
6 years ago
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
<style lang="css">
|
||
|
|
.aaa {
|
||
|
|
height: 100px;
|
||
|
|
}
|
||
|
|
/* .register .el-table .el-table__header-wrapper {
|
||
|
|
position: absolute;
|
||
|
|
top: 0;
|
||
|
|
left: 0;
|
||
|
|
}*/
|
||
|
|
/*
|
||
|
|
.register .el-table .el-table__fixed-body-wrapper {
|
||
|
|
height: calc(100% - 44px);
|
||
|
|
margin-top: 44px;
|
||
|
|
overflow-y: auto !important;
|
||
|
|
} */
|
||
|
|
</style>
|