Browse Source

Merge branch 'menu_customer' into dev

preview
lichao 2 years ago
parent
commit
89de941c3b
  1. 1
      epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
  2. 32
      epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue
  3. 16
      epmet-oper-web/src/views/modules/customer/customize/menuDataCustomer.vue
  4. 372
      epmet-oper-web/src/views/modules/customer/manage/CustomerList.vue
  5. 4
      epmet-oper-web/src/views/modules/workPc/dataMenu.vue
  6. 4
      epmet-oper-web/src/views/modules/workPc/menu.vue

1
epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue

@ -214,7 +214,6 @@ export default {
//
showMenu(customerId, customerName) {
this.showType = 'menuCustomer';
this.$nextTick(() => {
this.$refs['ref_menu_customer'].initData(customerId, customerName);
});

32
epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue

@ -66,7 +66,7 @@ export default {
tableParams: {
customerId: ''
},
search: '',
dataList: [],
selection: [],
selAllFlag: false,
@ -74,7 +74,8 @@ export default {
dataListLoading: false,
mixinViewModuleOptions: {
getDataListURL: '/gov/access/menu/customerMenuList'
getDataListURL: '/gov/access/menu/customerMenuList',
createdIsNeed:false
}
};
},
@ -83,15 +84,15 @@ export default {
components: {
AddOrUpdate
},
created() {},
methods: {
search() {
if (this.menuName != '') {
let saveList = [];
this.onFuzzyTreeList('name', this.menuName, this.dataList, saveList);
this.$refs.form.data = saveList;
this.dataList = [...saveList];
} else {
this.$refs.form.data = this.dataList;
this.query();
}
},
@ -174,6 +175,7 @@ export default {
.then(({ data: res }) => {
return this.$message.success('操作成功');
});
this.query();
},
query() {
@ -198,12 +200,15 @@ export default {
},
initData(customerId, customerName) {
this.customerId = customerId;
this.customerName = customerName;
// if (this.mixinViewModuleOptions.createdIsNeed) {
// console.log(this.customerId+"22222");
this.query();
// }
if (customerId != '') {
this.customerId = customerId;
this.customerName = customerName;
// if (this.mixinViewModuleOptions.createdIsNeed) {
// console.log(this.customerId+"22222");
this.query();
// }
}
},
handleSelectionChange(val) {
@ -225,8 +230,9 @@ export default {
.div_btn {
margin: 0 0 20px 0;
}
.little-head{
border-bottom: dashed 1px #ccc; line-height: 50px;
.little-head {
border-bottom: dashed 1px #ccc;
line-height: 50px;
margin-bottom: 20px;
}
</style>

16
epmet-oper-web/src/views/modules/customer/customize/menuDataCustomer.vue

@ -30,8 +30,8 @@
<el-table-column prop="sort" :label="$t('menu.sort')" header-align="center" align="center"></el-table-column>
<el-table-column prop="useFlag" :label="$t('menu.status')" header-align="center" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.useFlag === '0'" size="small">{{ $t('menu.status0') }}</el-tag>
<el-tag v-else size="small" type="info">{{ $t('menu.status1') }}</el-tag>
<el-tag v-if="scope.row.useFlag === '0'" size="small" type="info">{{ $t('menu.status0') }}</el-tag>
<el-tag v-else size="small">{{ $t('menu.status1') }}</el-tag>
</template>
</el-table-column>
@ -73,7 +73,8 @@ export default {
dataListLoading: false,
mixinViewModuleOptions: {
getDataListURL: '/gov/access/menu/customerMenuList'
getDataListURL: '/gov/access/menu/customerMenuList',
createdIsNeed: false
}
};
},
@ -88,9 +89,9 @@ export default {
if (this.menuName != '') {
let saveList = [];
this.onFuzzyTreeList('name', this.menuName, this.dataList, saveList);
this.$refs.form.data = saveList;
this.dataList = [...saveList];
} else {
this.$refs.form.data = this.dataList;
this.query();
}
},
@ -221,8 +222,9 @@ export default {
.div_btn {
margin: 0 0 20px 0;
}
.little-head{
border-bottom: dashed 1px #ccc; line-height: 50px;
.little-head {
border-bottom: dashed 1px #ccc;
line-height: 50px;
margin-bottom: 20px;
}
</style>

372
epmet-oper-web/src/views/modules/customer/manage/CustomerList.vue

@ -1,187 +1,223 @@
<template>
<div class="registerList">
<el-card shadow="never"
class="aui-card--fill">
<div class="mod-demo__demo}">
<el-form :inline="true"
:model="tableParams"
@keyup.enter.native="loadData()">
<el-form-item>
<el-input v-model="tableParams.customerName"
placeholder="客户名称">
</el-input>
</el-form-item>
<div class="registerList">
<el-card shadow="never" class="aui-card--fill">
<div class="mod-demo__demo}">
<el-form :inline="true" :model="tableParams" @keyup.enter.native="loadData()">
<el-form-item><el-input v-model="tableParams.customerName" placeholder="客户名称"></el-input></el-form-item>
<el-form-item>
<el-button @click="loadData()">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary"
@click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
<el-form-item><el-button @click="loadData()">查询</el-button></el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item><el-button type="danger" @click="del('')">删除</el-button></el-form-item>
</el-form>
<c-table column-type=""
ref="table"
:url="tableUrl"
:params="tableParams"
keyword="CustomerList"
:operations="operations"
:tableHeight="tableHeight"
:operationWidth="80"
@config="config"
@edit="edit"
@init="init">
</c-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
<edit-form ref="ref_edit_form"
@refresh="loadData"></edit-form>
<config-form ref="ref_config_form"
@refresh="loadData"></config-form>
</div>
<c-table
column-type="selection"
ref="table"
:url="tableUrl"
:params="tableParams"
keyword="CustomerList"
:operations="operations"
:tableHeight="tableHeight"
:operationWidth="80"
@config="config"
@edit="edit"
@init="init"
@del="del"
@select="select"
></c-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
<edit-form ref="ref_edit_form" @refresh="loadData"></edit-form>
<config-form ref="ref_config_form" @refresh="loadData"></config-form>
</div>
</template>
<script>
import CTable from '@c/CTable'
import EditForm from './EditForm'
import ConfigForm from './ConfigForm'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import AddOrUpdate from './customer-add-or-update.vue'
import mixinViewModule from "@/mixins/view-module";
import CTable from '@c/CTable';
import EditForm from './EditForm';
import ConfigForm from './ConfigForm';
import { mapGetters } from 'vuex';
import { Loading } from 'element-ui'; // Loading
import AddOrUpdate from './customer-add-or-update.vue';
import mixinViewModule from '@/mixins/view-module';
let loading //
let loading; //
export default {
mixins: [mixinViewModule],
data () {
return {
//
tableUrl: '/oper/crm/customer/customerlist',
// tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/crm/customer/customerlist',
tableParams: {
customerName: ''
},
//
operations: [
{
lable: '修改', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'edit', //
isShow: (row) => {
return true
}
},
{
lable: '配置', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'config', //
isShow: (row) => {
return true
}
},
{
lable: '数字社区初始化', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'init', //
isShow: (row) => {
return true
}
}
],
mixins: [mixinViewModule],
data() {
return {
//
tableUrl: '/oper/crm/customer/customerlist',
// tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/crm/customer/customerlist',
tableParams: {
customerName: ''
},
//
operations: [
{
lable: '修改', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'edit', //
isShow: row => {
return true;
}
},
{
lable: '配置', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'config', //
isShow: row => {
return true;
}
},
{
lable: '数字社区初始化', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'init', //
isShow: row => {
return true;
}
},
{
lable: '删除', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'del', //
isShow: row => {
return true;
}
}
],
//
tableData: [
//
tableData: [],
addOrUpdateVisible: false, // visible
multipleSelection: []
};
},
components: {
CTable,
EditForm,
ConfigForm,
AddOrUpdate
},
activated() {
this.$nextTick(() => {
this.$refs.table.doLayout(); //
});
},
mounted() {
// eslint-disable-next-line
console.log(this);
this.loadData();
},
computed: {
tableHeight() {
return this.clientHeight - 60 - 80 - 80 - 70;
},
...mapGetters(['clientHeight', 'env'])
},
methods: {
select(row) {
this.multipleSelection = row.map(item => {
return item.customerId;
});
console.log(this.multipleSelection);
},
//
loadData() {
this.$refs.table.loadData();
},
//
edit(row) {
this.$refs['ref_edit_form'].initData(row);
},
],
addOrUpdateVisible: false // visible
}
},
components: {
CTable, EditForm, ConfigForm,AddOrUpdate
},
activated () {
this.$nextTick(() => {
this.$refs.table.doLayout() //
})
},
mounted () {
// eslint-disable-next-line
console.log(this)
this.loadData()
},
computed: {
tableHeight () {
return this.clientHeight - 60 - 80 - 80 - 70
},
...mapGetters(['clientHeight', 'env'])
},
methods: {
//
init(row) {
let params = {
customerId: row.customerId,
areaCode: row.rootAgencyAreaCode
};
//
loadData () {
this.$refs.table.loadData()
},
//
edit (row) {
this.$refs['ref_edit_form'].initData(row)
},
this.$http.get(`/oper/customize/icform/initCustomerForm/resi_base_info/`, { params: params }).then(({ data: res }) => {
if (res.code === 0) {
return this.$message.info(res.data);
} else {
return this.$message.error(res.internalMsg);
}
});
},
//
init (row) {
let params = {
customerId: row.customerId,
areaCode: row.rootAgencyAreaCode,
}
del(row) {
console.log('this.multipleSelection', row);
let ids = [];
this.$http.get(`/oper/customize/icform/initCustomerForm/resi_base_info/`, {params: params}).then(({ data: res }) => {
if (res.code === 0) {
return this.$message.info(res.data)
} else {
return this.$message.error(res.internalMsg)
}
})
},
if (row != '') {
ids = [row.customerId];
} else {
if (this.multipleSelection.length > 0) {
ids = this.multipleSelection;
} else {
return this.$message.error('请选择菜单');
}
}
// let params = {
// ids
// };
this.$http.post('oper/crm/customer/delete', ids).then(({ data: res }) => {
console.log(res);
if (res.code === 0) {
this.$message.info("操作成功");
this.$refs.table.loadData();
} else {
return this.$message.error(res.internalMsg);
}
});
},
//
config (row) {
this.$refs['ref_config_form'].initData(row)
},
//
config(row) {
this.$refs['ref_config_form'].initData(row);
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
}
}
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
}
}
}
};
</script>
<style lang="css">
.aaa {

4
epmet-oper-web/src/views/modules/workPc/dataMenu.vue

@ -111,9 +111,9 @@ export default {
if (this.menuName != '') {
let saveList = [];
this.onFuzzyTreeList('name', this.menuName, this.dataList, saveList);
this.$refs.form.data = saveList;
this.dataList = [...saveList];
} else {
this.$refs.form.data = this.dataList;
this.getDataList();
}
},

4
epmet-oper-web/src/views/modules/workPc/menu.vue

@ -107,9 +107,9 @@ export default {
if (this.menuName != '') {
let saveList = [];
this.onFuzzyTreeList('name', this.menuName, this.dataList, saveList);
this.$refs.form.data = saveList;
this.dataList = [...saveList];
} else {
this.$refs.form.data = this.dataList;
this.getDataList();
}
},

Loading…
Cancel
Save