|
@@ -81,6 +81,21 @@
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>-->
|
|
</el-form-item>-->
|
|
|
|
+ <el-form-item label="标签" prop="tagIds">
|
|
|
|
+ <div @click="hangleChangeTags()" style="cursor: pointer; border: 1px solid #e6e6e6; background-color: white; overflow: hidden; flex-grow: 1;width: 250px">
|
|
|
|
+ <div style="min-height: 35px; max-height: 200px; overflow-y: auto;">
|
|
|
|
+ <el-tag type="success"
|
|
|
|
+ closable
|
|
|
|
+ :disable-transitions="false"
|
|
|
|
+ v-for="list in this.selectTags"
|
|
|
|
+ :key="list.tagId"
|
|
|
|
+ @close="handleCloseTags(list)"
|
|
|
|
+ style="margin: 3px;"
|
|
|
|
+ >{{list.name}}
|
|
|
|
+ </el-tag>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
<el-date-picker v-model="createTime" size="small" style="width: 220px"
|
|
<el-date-picker v-model="createTime" size="small" style="width: 220px"
|
|
value-format="yyyy-MM-dd" type="daterange" range-separator="-"
|
|
value-format="yyyy-MM-dd" type="daterange" range-separator="-"
|
|
@@ -169,6 +184,13 @@
|
|
<el-table-column label="企微主体名称" align="center" prop="corpName" />
|
|
<el-table-column label="企微主体名称" align="center" prop="corpName" />
|
|
<el-table-column label="企微用户id" align="center" prop="qwUser.qwUserId" />
|
|
<el-table-column label="企微用户id" align="center" prop="qwUser.qwUserId" />
|
|
<el-table-column label="时长秒" align="center" prop="duration" />
|
|
<el-table-column label="时长秒" align="center" prop="duration" />
|
|
|
|
+ <el-table-column label="标签" align="center" prop="tagIdsName" width="250px">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div v-for="name in scope.row.tagIdsName" style="display: inline;">
|
|
|
|
+ <el-tag type="success">{{ name }}</el-tag>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="接通数量" align="center" prop="connectCount" />
|
|
<el-table-column label="接通数量" align="center" prop="connectCount" />
|
|
<el-table-column label="未接通数量" align="center" prop="noConnectCount" />
|
|
<el-table-column label="未接通数量" align="center" prop="noConnectCount" />
|
|
<!-- <el-table-column label="标题" align="center" width="80" prop="title" />-->
|
|
<!-- <el-table-column label="标题" align="center" width="80" prop="title" />-->
|
|
@@ -200,6 +222,47 @@
|
|
</el-table-column>-->
|
|
</el-table-column>-->
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 搜索标签 -->
|
|
|
|
+ <el-dialog :title="changeTagDialog.title" :visible.sync="changeTagDialog.open" width="1000px" append-to-body>
|
|
|
|
+
|
|
|
|
+ <div>搜索标签:
|
|
|
|
+ <el-input v-model="queryTagParams.name" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(queryTagParams.name)">搜索</el-button>
|
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-for="item in tagGroupList" :key="item.id" >
|
|
|
|
+ <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
|
|
|
|
+ <span class="name-background">{{ item.name }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 添加外层滚动容器 -->
|
|
|
|
+ <div class="scroll-wrapper">
|
|
|
|
+ <div class="tag-container">
|
|
|
|
+ <a
|
|
|
|
+ v-for="tagItem in item.tag"
|
|
|
|
+ class="tag-box"
|
|
|
|
+ @click="tagSelection(tagItem)"
|
|
|
|
+ :class="{ 'tag-selected': tagItem.isSelected }"
|
|
|
|
+ >
|
|
|
|
+ {{ tagItem.name }}
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <pagination
|
|
|
|
+ v-show="tagTotal>0"
|
|
|
|
+ :total="tagTotal"
|
|
|
|
+ :page.sync="queryTagParams.pageNum"
|
|
|
|
+ :limit.sync="queryTagParams.pageSize"
|
|
|
|
+ @pagination="getPageListTagGroup"
|
|
|
|
+ />
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="tagSubmitForm()">确 定</el-button>
|
|
|
|
+ <el-button @click="tagCancel()">取消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<pagination
|
|
<pagination
|
|
v-show="total>0"
|
|
v-show="total>0"
|
|
:total="total"
|
|
:total="total"
|
|
@@ -217,6 +280,8 @@ import {getCompanyUserListLikeName} from "@/api/company/companyUser";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import {treeselect} from "../../../api/company/companyDept";
|
|
import {treeselect} from "../../../api/company/companyDept";
|
|
|
|
+import {allListTagGroup} from "@/api/qw/tagGroup";
|
|
|
|
+import {searchTags} from "@/api/qw/tag";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "QwUserVoiceLog",
|
|
name: "QwUserVoiceLog",
|
|
@@ -240,6 +305,30 @@ export default {
|
|
createTime:null,
|
|
createTime:null,
|
|
beginTime:null,
|
|
beginTime:null,
|
|
endTime:null,
|
|
endTime:null,
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ selectTags:[],
|
|
|
|
+ queryTagParams:{
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 5,
|
|
|
|
+ total:0,
|
|
|
|
+ name:null,
|
|
|
|
+ corpId:null,
|
|
|
|
+ },
|
|
|
|
+ //标签
|
|
|
|
+ changeTagDialog:{
|
|
|
|
+ title:"",
|
|
|
|
+ open:false,
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ tagTotal:0,
|
|
|
|
+
|
|
|
|
+ tagGroupList: [],
|
|
|
|
+
|
|
|
|
+ addTagForm:{
|
|
|
|
+ userIds:[],
|
|
|
|
+ tagIds:[]
|
|
|
|
+ },
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
// 企微用户通话记录表格数据
|
|
// 企微用户通话记录表格数据
|
|
@@ -270,6 +359,7 @@ export default {
|
|
createTime:null,
|
|
createTime:null,
|
|
beginTime:null,
|
|
beginTime:null,
|
|
endTime:null,
|
|
endTime:null,
|
|
|
|
+ tagIds: null,
|
|
},
|
|
},
|
|
// 表单参数
|
|
// 表单参数
|
|
form: {},
|
|
form: {},
|
|
@@ -294,11 +384,132 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ tagSubmitForm(){
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < this.tagGroupList.length; i++) {
|
|
|
|
+ for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
|
|
|
|
+ if (this.tagGroupList[i].tag[x].isSelected === true) {
|
|
|
|
+
|
|
|
|
+ if (!this.selectTags) {
|
|
|
|
+ this.selectTags = [];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 检查当前 tag 是否已经存在于 tagListFormIndex[index] 中
|
|
|
|
+ let tagExists = this.selectTags.some(
|
|
|
|
+ tag => tag.id === this.tagGroupList[i].tag[x].id
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ // 如果 tag 不存在于 tagListFormIndex[index] 中,则新增
|
|
|
|
+ if (!tagExists) {
|
|
|
|
+ this.selectTags.push(this.tagGroupList[i].tag[x]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!this.selectTags || this.selectTags.length === 0) {
|
|
|
|
+ return this.$message('请选择标签');
|
|
|
|
+ }
|
|
|
|
+ this.changeTagDialog.open = false;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //取消选择标签
|
|
|
|
+ tagCancel(){
|
|
|
|
+ this.changeTagDialog.open = false;
|
|
|
|
+ },
|
|
|
|
+ tagSelection(row){
|
|
|
|
+
|
|
|
|
+ row.isSelected= !row.isSelected;
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ },
|
|
|
|
+ handleSearchTags(name){
|
|
|
|
+
|
|
|
|
+ if (!name){
|
|
|
|
+ return this.$message.error("请输入要搜索的标签")
|
|
|
|
+ }
|
|
|
|
+ this.queryTagParams.name=name;
|
|
|
|
+ this.queryTagParams.corpId=this.queryParams.corpId;
|
|
|
|
+
|
|
|
|
+ searchTags(this.queryTagParams).then(response => {
|
|
|
|
+ this.tagGroupList = response.rows;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // searchTags({name:name,corpId:this.queryParams.corpId}).then(response => {
|
|
|
|
+ // this.tagGroupList = response.rows;
|
|
|
|
+ // });
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ cancelSearchTags(){
|
|
|
|
+ this.resetSearchQueryTag()
|
|
|
|
+
|
|
|
|
+ this.getPageListTagGroup();
|
|
|
|
+ },
|
|
|
|
+ //删除一些选择的标签
|
|
|
|
+ handleCloseTags(list){
|
|
|
|
+ const ls = this.selectTags.findIndex(t => t.tagId === list.tagId);
|
|
|
|
+ if (ls !== -1) {
|
|
|
|
+ this.selectTags.splice(ls, 1);
|
|
|
|
+ this.selectTags = [...this.selectTags];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.selectTags!=null && this.selectTags.length>0){
|
|
|
|
+ // 确保 this.form.tags 是数组
|
|
|
|
+ if (!this.queryParams.tagIds) {
|
|
|
|
+ this.queryParams.tagIds = []; // 如果未定义,初始化
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParams.tagIds = []; // 清空已有数据
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 遍历并添加 tagId
|
|
|
|
+ this.selectTags.forEach(tag => {
|
|
|
|
+ if (tag.tagId) { // 确保 tagId 存在
|
|
|
|
+ this.queryParams.tagIds.push(tag.tagId);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ console.log(this.queryParams.tagIds)
|
|
|
|
+ this.queryParams.tagIds=this.queryParams.tagIds.join(",");
|
|
|
|
+ }else {
|
|
|
|
+ this.queryParams.tagIds=null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ getPageListTagGroup(){
|
|
|
|
+ this.queryTagParams.corpId=this.queryParams.corpId
|
|
|
|
+ allListTagGroup(this.queryTagParams).then(response => {
|
|
|
|
+ this.tagGroupList = response.rows;
|
|
|
|
+ this.tagTotal = response.total;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //搜索的标签
|
|
|
|
+ hangleChangeTags(){
|
|
|
|
+
|
|
|
|
+ this.changeTagDialog.title="搜索的标签"
|
|
|
|
+ this.changeTagDialog.open=true;
|
|
|
|
+
|
|
|
|
+ // 获取 tagListFormIndex 中的所有 tagId,用于快速查找
|
|
|
|
+ const selectedTagIds = new Set(
|
|
|
|
+ (this.selectTags || []).map(tagItem => tagItem?.tagId)
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ this.queryTagParams.name=null;
|
|
|
|
+
|
|
|
|
+ this.getPageListTagGroup();
|
|
|
|
+
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ for (let i = 0; i < this.tagGroupList.length; i++) {
|
|
|
|
+ for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
|
|
|
|
+ this.tagGroupList[i].tag[x].isSelected = selectedTagIds.has(this.tagGroupList[i].tag[x].tagId);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, 200);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
/** 查询企微用户通话记录列表 */
|
|
/** 查询企微用户通话记录列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- this.status = 0;
|
|
|
|
- listQwUserVoiceLogTotal(this.queryParams).then(response => {
|
|
|
|
|
|
+ const { qwUserName, ...queryParams } = this.queryParams;
|
|
|
|
+ listQwUserVoiceLog(queryParams).then(response => {
|
|
this.qwUserVoiceLogList = response.rows;
|
|
this.qwUserVoiceLogList = response.rows;
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -395,6 +606,24 @@ export default {
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
|
|
+ if (this.selectTags!=null && this.selectTags.length>0){
|
|
|
|
+ // 确保 this.form.tags 是数组
|
|
|
|
+ if (!this.queryParams.tagIds) {
|
|
|
|
+ this.queryParams.tagIds = []; // 如果未定义,初始化
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParams.tagIds = []; // 清空已有数据
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 遍历并添加 tagId
|
|
|
|
+ this.selectTags.forEach(tag => {
|
|
|
|
+ if (tag.tagId) { // 确保 tagId 存在
|
|
|
|
+ this.queryParams.tagIds.push(tag.tagId);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ //this.queryParams.tagIds=this.queryParams.tagIds.join(",");
|
|
|
|
+ }else {
|
|
|
|
+ this.queryParams.tagIds=null;
|
|
|
|
+ }
|
|
this.queryParams.pageNum = 1;
|
|
this.queryParams.pageNum = 1;
|
|
this.handlePagination();
|
|
this.handlePagination();
|
|
},
|
|
},
|
|
@@ -404,6 +633,11 @@ export default {
|
|
this.createTime=null;
|
|
this.createTime=null;
|
|
this.queryParams.beginTime = null;
|
|
this.queryParams.beginTime = null;
|
|
this.queryParams.endTime = null;
|
|
this.queryParams.endTime = null;
|
|
|
|
+ this.queryParams.corpId= this.myQwCompanyList[0].dictValue;
|
|
|
|
+ this.selectTags=[];
|
|
|
|
+ this.createTime=null;
|
|
|
|
+ this.queryParams.sTime=null;
|
|
|
|
+ this.queryParams.eTime=null;
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
@@ -485,3 +719,103 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
+
|
|
|
|
+<style scoped>
|
|
|
|
+/* CSS 样式 */
|
|
|
|
+.tag-container {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-wrap: wrap; /* 超出宽度时自动换行 */
|
|
|
|
+ gap: 8px; /* 设置标签之间的间距 */
|
|
|
|
+}
|
|
|
|
+.name-background {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ background-color: #abece6; /* 背景颜色 */
|
|
|
|
+ padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
|
|
|
|
+ border-radius: 4px; /* 可选:设置圆角 */
|
|
|
|
+}
|
|
|
|
+/* CSS 样式 */
|
|
|
|
+.tag-container {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-wrap: wrap; /* 超出宽度时自动换行 */
|
|
|
|
+ gap: 8px; /* 设置标签之间的间距 */
|
|
|
|
+}
|
|
|
|
+.name-background {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ background-color: #abece6; /* 背景颜色 */
|
|
|
|
+ padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
|
|
|
|
+ border-radius: 4px; /* 可选:设置圆角 */
|
|
|
|
+}
|
|
|
|
+.tag-box {
|
|
|
|
+ padding: 8px 12px;
|
|
|
|
+ border: 1px solid #989797;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ display: inline-block;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.tag-selected {
|
|
|
|
+ background-color: #00bc98;
|
|
|
|
+ color: #fff;
|
|
|
|
+ border-color: #00bc98;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.el-tag + .el-tag {
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+.suggestion-box {
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 999;
|
|
|
|
+ background: #fff;
|
|
|
|
+ border: 1px solid #ddd;
|
|
|
|
+ max-height: 200px;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ width: 100%;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.suggestion-item {
|
|
|
|
+ padding: 10px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
|
|
+.suggestion-item:hover {
|
|
|
|
+ background-color: #f5f7fa;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.button-new-tag {
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ height: 32px;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ padding-top: 0;
|
|
|
|
+ padding-bottom: 0;
|
|
|
|
+}
|
|
|
|
+.input-new-tag {
|
|
|
|
+ width: 90px;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ vertical-align: bottom;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.feedback-dialog {
|
|
|
|
+ width: 100%;
|
|
|
|
+ max-width: 1000px;
|
|
|
|
+ max-height: 80vh; /* 限制最大高度为视窗高度的 80% */
|
|
|
|
+ overflow-y: auto; /* 超出时显示垂直滚动条 */
|
|
|
|
+ padding: 20px;
|
|
|
|
+ box-sizing: border-box; /* 确保 padding 不影响总宽度 */
|
|
|
|
+}
|
|
|
|
+/* 新增的滚动容器样式(不影响原有样式) */
|
|
|
|
+.scroll-wrapper {
|
|
|
|
+ max-height: 130px; /* 大约三行的高度 */
|
|
|
|
+ overflow-y: auto; /* 垂直滚动 */
|
|
|
|
+ padding-right: 5px; /* 为滚动条留出空间 */
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* 美化滚动条(可选) */
|
|
|
|
+.scroll-wrapper::-webkit-scrollbar {
|
|
|
|
+ width: 6px;
|
|
|
|
+}
|
|
|
|
+.scroll-wrapper::-webkit-scrollbar-thumb {
|
|
|
|
+ background: rgba(0, 0, 0, 0.2);
|
|
|
|
+ border-radius: 3px;
|
|
|
|
+}
|
|
|
|
+</style>
|