Pārlūkot izejas kodu

修改客户来源

newStyle
douzhuo pirms 2 gadiem
vecāks
revīzija
4e6d6fc719
5 mainītis faili ar 230 papildinājumiem un 131 dzēšanām
  1. +15
    -18
      src/page/check/chose.vue
  2. +1
    -0
      src/views/Customer/AgentManagement.vue
  3. +101
    -93
      src/views/Customer/source.vue
  4. +74
    -20
      src/views/contentManage/updateRecord/list.vue
  5. +39
    -0
      src/views/contentManage/updateRecord/table.js

+ 15
- 18
src/page/check/chose.vue Parādīt failu

@@ -160,17 +160,20 @@
</div>
</div>
</div>
<el-pagination
style="margin: 20px auto"
class="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="size"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>

<div style="margin: 0 auto;width: 1100px;display: flex;justify-content: flex-end;">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
page-sizes="[15]"
:page-size="size"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
:hide-on-single-page="true"
>
</el-pagination>
</div>
</div>
</template>

@@ -220,7 +223,7 @@ export default {
agentName: "", //代理商名称
companyName: "",
total: 20,
size: 10,
size: 15,
list: [],
options: [],
info: {},
@@ -522,12 +525,6 @@ export default {
background: rgba(38, 113, 226, 0.04);
}
}
.page {
// position: absolute;
// bottom: 0;
// left: 30%;
text-align: center;
}
/deep/ .el-button--primary {
background: #2671e2 !important;
border: 1px solid #2671e2 !important;


+ 1
- 0
src/views/Customer/AgentManagement.vue Parādīt failu

@@ -89,6 +89,7 @@
justify-content: space-between;
align-items: center;
padding: 0 20px;
marginLeft: 120px;
"
>
<div class="app-titel" style="margin-top: 15px">


+ 101
- 93
src/views/Customer/source.vue Parādīt failu

@@ -1,24 +1,45 @@
<template>
<div class="box-center">
<!-- 头 -->
<div class="app-top" v-if="cus_sou_add || cus_sou_downLoad">
<div class="app-top">
<template v-if="role">
<div class="app-titel" style="margin: 0 0 10px 10px;">
<div class="titel-text">项目选择:</div>
<div style="margin-left: 26px">
<el-select
v-model="paramsList.houseId"
filterable
placeholder="请选择"
@change="houseChange"
>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
</template>
<div style="margin-left: 20px; display: flex">
<el-button v-if="cus_sou_add" @click="editorinfo()" type="primary"
>新增</el-button
>
<div
style="margin-left: auto; margin-right: 10px"
v-if="cus_sou_downLoad"
>
<el-button @click="downLoad" icon="el-icon-download">导出</el-button>
</div>
</div>
</div>

<!-- 表格 -->
<div class="cen-tab">
<el-table :data="tableData" stripe style="width: 100%" row-key="id" :header-cell-style="{background:'#F5F7FA',color:'#333333'}">
<el-table-column label="序号" align="center">
<el-table
:data="tableData"
stripe
style="width: 100%"
row-key="id"
:header-cell-style="{ background: '#F5F7FA', color: '#333333' }"
>
<el-table-column label="序号" width="150" align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
@@ -28,9 +49,11 @@
<el-table-column prop="customerCount" label="关联客户" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope" style="">
<el-button type="text" @click="bianji(scope.row)">编辑</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
<template slot-scope="{ row }">
<el-button v-if="cus_sou_edit" type="text" @click="bianji(row)">编辑</el-button>

<el-button v-if="cus_sou_del" type="text" @click="del(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -112,7 +135,6 @@

<script>
import { mapGetters } from "vuex";
import { exportMethodPost } from "@/util/util";
import Sortable from "sortablejs";
export default {
data() {
@@ -133,6 +155,7 @@ export default {
},
houseId: "",
houseList: [],

Page: 1,
size: 10,
words: "",
@@ -147,8 +170,7 @@ export default {
// 列表入参
id: "",
sourceName: "", // 资源名称
houseId:
localStorage.getItem("houseId"), // 项目id
houseId: localStorage.getItem("houseId"), // 项目id
sort: "", // 顺序
},

@@ -156,8 +178,7 @@ export default {
// 删除入参
id: "",
newSourceId: "",
houseId:
localStorage.getItem("houseId"), // 项目id
houseId: localStorage.getItem("houseId"), // 项目id
},
delIdList: [], // 要转移的数据位置

@@ -170,18 +191,44 @@ export default {
},
computed: {
...mapGetters(["permissions"]),
role() {
return localStorage.getItem("orgType") != 3;
},
},
created() {
this.cus_sou_add = this.permissions["cus_sou_add"];
this.cus_sou_downLoad = this.permissions["cus_sou_downLoad"];
this.cus_sou_del = this.permissions["cus_sou_del"];
this.cus_sou_edit = this.permissions["cus_sou_edit"];
},
mounted() {
this.rowDrop();
this.getList();
async mounted() {
await this.initPage()
},
methods: {
async initPage() {
if (this.role) {
await this.zkhousePage();
await this.getList();
} else {
this.getList();
}
this.rowDrop(); // 拖拽方法
},

//获取项目
async zkhousePage() {
try {
let res = await this.$api.api.findHouseByUser({
orgType: localStorage.getItem("orgType"),
houseTypes: "",
});
this.houseList = res.data;
this.paramsList.houseId = res.data[0].id;
this.deleteParams.houseId = res.data[0].id;
} catch (e) {
console.log(e);
}
},

/*判断类型选择使用方法*/
addForm() {
if (!this.editFlag) this.addCustomer();
@@ -228,7 +275,11 @@ export default {
// 编辑
editCustomer() {
this.$refs.ruleForm.validate((valid) => {
this.$api.api.setSourceUpdate(this.ruleForm).then((res) => {
let obj = {
...this.ruleForm,
houseId: this.paramsList.houseId
}
this.$api.api.setSourceUpdate(obj).then((res) => {
console.log(res);
if (res.code == 10000) {
this.dialogVisible = false;
@@ -269,13 +320,15 @@ export default {
},

// 获取列表
getList() {
this.$api.api.getSourceList(this.paramsList).then((res) => {
async getList() {
try {
let res = await this.$api.api.getSourceList(this.paramsList);
if (res.code == 10000) {
console.log(res, "list");
this.tableData = res.data;
}
});
} catch (e) {
console.log(e);
}
},

//行拖拽
@@ -315,51 +368,15 @@ export default {
},
});
},
downLoad() {
let obj = {
houseId: this.houseId,
words: this.words,
};
// exportMethodPost()
exportMethodPost("autoSR/sensitivewords/export", "禁忌话术", obj);
},
houseChange() {
houseChange(e) {
this.deleteParams.houseId = e
this.Page = 1;
this.words = "";
this.taboofindbypagelist();
},
zkhousePage() {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
this.houseList = res.data;
if (localStorage.getItem("orgType") == 3) {
this.houseId = localStorage.getItem("houseId");
} else {
this.houseId = res.data[0].id;
}
// this.houseId = res.data[0].id;
this.taboofindbypagelist();
});
},
taboofindbypagelist() {
let obj = {
current: this.Page,
size: this.size,
houseId: this.houseId,
words: this.words,
};
this.$api.http.taboofindbypage(obj).then((res) => {
console.log(res);
this.tableData = res.data.records;
this.total = res.data.total;
});
this.getList();
},
screening() {
this.Page = 1;
this.taboofindbypagelist();
this.getList();
},
//删除
del(item) {
@@ -398,8 +415,8 @@ export default {
if (this.editFlag == false) {
this.$api.http
.tabooadd({
houseId: this.houseId,
words: this.ruleForm.words,
houseId: this.paramsList.houseId,
words: this.ruleForm.sourceName,
})
.then((res) => {
if (res.code == 0) {
@@ -411,7 +428,7 @@ export default {
this.$refs.ruleForm.resetFields();
this.Page = 1;
this.words = "";
this.taboofindbypagelist();
this.getList();
} else {
this.$message.error(res.message);
}
@@ -419,8 +436,9 @@ export default {
} else {
this.$api.http
.tabooupdate({
houseId: this.paramsList.houseId,
id: this.ruleForm.id,
words: this.ruleForm.words,
sourceName: this.ruleForm.sourceName,
})
.then((res) => {
if (res.code == 0) {
@@ -432,7 +450,7 @@ export default {
this.$refs.ruleForm.resetFields();
this.Page = 1;
this.words = "";
this.taboofindbypagelist();
this.getList();
} else {
this.$message.error(res.message);
}
@@ -443,16 +461,6 @@ export default {
}
});
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.size = val;
this.taboofindbypagelist();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.Page = val;
this.taboofindbypagelist();
},
},
};
</script>
@@ -511,27 +519,27 @@ export default {
}
}
}
/deep/ .el-table__header-wrapper{
thead{
tr{
th{
background: #F5F7FA;
/deep/ .el-table__header-wrapper {
thead {
tr {
th {
background: #f5f7fa;
color: #333333;
}
}
}
}
/deep/ .el-dialog--center{
/deep/ .el-dialog--center {
border-radius: 8px;
.el-dialog__title{
.el-dialog__title {
font-weight: bold;
}
}
/deep/ .el-button--primary{
background: #2671E2 !important;
border: 1px solid #2671E2 !important;
/deep/ .el-button--primary {
background: #2671e2 !important;
border: 1px solid #2671e2 !important;
}
/deep/ .el-button--text{
color: #2671E2;
/deep/ .el-button--text {
color: #2671e2;
}
</style>

+ 74
- 20
src/views/contentManage/updateRecord/list.vue Parādīt failu

@@ -48,7 +48,26 @@

<!-- 表格 -->
<div class="cen-tab">
<el-table :header-cell-style="{background:'#F5F7FA',color:'#333333'}" :data="tableData" stripe style="width: 100%" height="640">

<avue-crud
ref="crud"
:page.sync="page"
:data="tableData"
:table-loading="tableLoading"
:option="tableOption"
:show-column.sync="showColumn"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
<template slot-scope="{ row }" slot="menu">
<el-button type="text" @click="modify(row.id,row.orgType)"
v-if="con_list_modify">编辑</el-button>
<el-button type="text" @click="remove(row.id)"
v-if="con_list_del">删除</el-button>
</template>
</avue-crud>

<!-- <el-table :header-cell-style="{background:'#F5F7FA',color:'#333333'}" :data="tableData" stripe style="width: 100%" height="640">
<el-table-column prop="title" label="标题" align="center"></el-table-column>
<el-table-column prop="pageView" label="阅读数" align="center"></el-table-column>
<el-table-column prop="createUser" label="发布人" align="center"></el-table-column>
@@ -72,8 +91,8 @@
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</el-pagination> -->
<!-- </div> -->
</div>
</div>
</template>
@@ -85,6 +104,16 @@ export default {
name: "updateList",
data() {
return {
tableIdName: "contentManageUpdateRecordList", // 当前页面需要的变量
tableOption: this.$tableOption.contentManageUpdateRecordList, // 当前table配置项
tableLoading: false, // 监听的显示列的变量
showColumn: [], // 监听的显示列的变量
page: {
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 10, // 每页显示多少条
},

current: 1,
size:10,
total:0,
@@ -97,8 +126,18 @@ export default {
computed: {
...mapGetters(["permissions"]),
},
watch: {},
watch: {
showColumn(nowV) {
let params = {
tableIdName: this.tableIdName,
optionData: nowV,
};
this.$db.upDate(params);
},
},
created() {
// 获取显隐的列表
this.setTableOption();
this.con_list_add = this.permissions["con_list_add"];
this.con_list_modify = this.permissions["con_list_modify"];
this.con_list_del = this.permissions["con_list_del"];
@@ -110,21 +149,33 @@ export default {
this.selValue = "1"
}
let data = {
current:1,
size:10,
current: this.page.currentPage,
size: this.page.pageSize,
orgType:this.selValue,
}
if (data.orgType == 3) data.messageType = 3
this.filefindByPage(data)
},
methods: {
// 获取当前页面的显隐
setTableOption() {
this.$db.getDataByKey(this.tableIdName).then((res) => {
console.log(res, "获取存储的res");
if (res.tableIdName == this.tableIdName) {
this.showColumn = res.optionData;
}
});
},
selChange() {
let data = {
current:1,
size:10,
current: this.page.currentPage,
size: this.page.pageSize,
orgType:this.selValue,
startTime:this.time[0],
endTime:this.time[1],
}
if (this.time) {
data.startTime = this.time[0]
data.endTime = this.time[1]
}
if (data.orgType == 3) data.messageType = 3
this.filefindByPage(data)
@@ -137,8 +188,8 @@ export default {
},
noempty() {
let data = {
current:1,
size:10,
current: this.page.currentPage,
size: this.page.pageSize,
orgType:this.selValue,
startTime:this.time[0],
endTime:this.time[1]
@@ -148,8 +199,8 @@ export default {
},
empty() {
let data = {
current:1,
size:10,
current: this.page.currentPage,
size: this.page.pageSize,
orgType:this.selValue,
startTime:"",
endTime:"",
@@ -177,20 +228,23 @@ export default {
}
});
},
// 分页数量改变
handleSizeChange(val) {
this.size=val;
this.page.pageSize = val;
let data = {
current:1,
size:val,
current: this.page.currentPage,
size: this.page.pageSize,
orgType:this.selValue,
}
this.filefindByPage(data)
},

// 翻页
handleCurrentChange(val) {
this.current = val;
this.page.currentPage = val;
let data = {
current:val,
size:10,
current: this.page.currentPage,
size: this.page.pageSize,
orgType:this.selValue,
}
this.filefindByPage(data)


+ 39
- 0
src/views/contentManage/updateRecord/table.js Parādīt failu

@@ -0,0 +1,39 @@
export default {
contentManageUpdateRecordList: {
border: true,
index: false,
height: 572,
indexLabel: "序号",
stripe: true,
menuAlign: "center",
menuWidth: 146,
menu: true,
align: "center",
refreshBtn: false,
searchSize: "mini",
searchMenuSpan: 9,
delBtn: false,
addBtn: false,
editBtn: false,
viewBtn: false,
size: "small",
column: [
{
label: "标题",
prop: "title",
},
{
label: "阅读数",
prop: "pageView",
},
{
label: "发布人",
prop: "createUser",
},
{
label: "发布时间",
prop: "createTime",
},
]
}
}

Notiek ielāde…
Atcelt
Saglabāt