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.
213 lines
5.0 KiB
213 lines
5.0 KiB
<template>
|
|
<div class="registerList">
|
|
<el-card shadow="never"
|
|
class="aui-card--fill">
|
|
<div class="mod-demo__demo}">
|
|
<el-form :inline="true"
|
|
:model="dataForm"
|
|
@keyup.enter.native="loadData()">
|
|
<el-form-item>
|
|
<el-input v-model="dataForm.name"
|
|
placeholder="组织名称">
|
|
|
|
</el-input>
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
<el-button @click="loadData()">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<c-table column-type=""
|
|
ref="table"
|
|
:url="tableUrl"
|
|
:params="tableParams"
|
|
keyword="RegisterInfo"
|
|
:operations="operations"
|
|
:tableHeight="tableHeight"
|
|
@commitCode="commitCode"
|
|
@init="init">
|
|
</c-table>
|
|
|
|
</div>
|
|
</el-card>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import CTable from '@c/CTable'
|
|
import { mapGetters } from 'vuex'
|
|
export default {
|
|
data () {
|
|
return {
|
|
loading: false,
|
|
dataForm: {
|
|
name: '' // 组织名称
|
|
},
|
|
// 列表相关
|
|
tableUrl: '/third/pacustomer/registerinfo',
|
|
// tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/pacustomer/registerinfo',
|
|
tableParams: {
|
|
type: Object, // table的查询参数
|
|
default () {
|
|
return {}
|
|
}
|
|
},
|
|
// 列表操作栏的操作项数组
|
|
operations: [
|
|
{
|
|
lable: '初始化', // 按钮显示名称
|
|
size: 'mini',
|
|
style: 'margin: 0 6px;',
|
|
type: 'text',
|
|
slot: '',
|
|
plain: false,
|
|
methodName: 'init', // 回调方法名称
|
|
isShow: function (row) {
|
|
if (row.initState === 0 && row.resiAuth === 1 && row.workAuth === 1) {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
lable: '上传代码', // 按钮显示名称
|
|
size: 'mini',
|
|
style: 'margin: 0 6px;',
|
|
type: 'text',
|
|
slot: '',
|
|
plain: false,
|
|
methodName: 'commitCode', // 回调方法名称
|
|
isShow: function (row) {
|
|
if (row.initState === 1) {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
// 查询栏下拉框数据
|
|
optionData:
|
|
{
|
|
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: '已授权'
|
|
}
|
|
],
|
|
|
|
// 初始化相关
|
|
initUrl: '/oper/crm/customer/init'
|
|
}
|
|
},
|
|
components: {
|
|
CTable
|
|
},
|
|
activated () {
|
|
this.$nextTick(() => {
|
|
this.$refs.table.doLayout() // 解决表格错位
|
|
})
|
|
},
|
|
mounted () {
|
|
this.loadData()
|
|
},
|
|
computed: {
|
|
tableHeight () {
|
|
return this.clientHeight - 60 - 80 - 80 - 50
|
|
},
|
|
...mapGetters(['clientHeight'])
|
|
},
|
|
methods: {
|
|
// 获取列表数据
|
|
loadData () {
|
|
this.$refs.table.loadData()
|
|
},
|
|
// 客户初始化
|
|
init (row) {
|
|
const param = {
|
|
customerId: row.customerId
|
|
}
|
|
window.app.ajax.post(this.initUrl, param,
|
|
(data, rspMsg) => {
|
|
this.$message.success('初始化成功')
|
|
this.loadData()
|
|
// eslint-disable-next-line
|
|
},
|
|
(rspMsg, data) => {
|
|
this.$message.error(rspMsg)
|
|
})
|
|
},
|
|
// 上传代码
|
|
commitCode (row) {
|
|
this.$router.push({
|
|
'name': 'code-CommitList',
|
|
'params': {
|
|
showCommit: true,
|
|
customerId: row.customerId,
|
|
name: row.agencyName
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</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>
|
|
|