mutualList.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <div class="container-mutualList">
  3. <el-card>
  4. <div>
  5. <span class="intro">{{ userForm.UserName }}-{{ userForm.Mobile }}-{{ userForm.ComapnyName }}</span>
  6. <span class="organization-details" @click="goWholeDetail">机构互动详情>></span>
  7. </div>
  8. <div class="department-tabs">
  9. <span :class="['item', activeTypeName == item.value && 'active']" v-for="item in typeList" :key="item.value" @click="typeHandleClick(item)">{{ item.label }}</span>
  10. </div>
  11. <div class="tabs">
  12. <span :class="['item', activeName == item.Source && 'active']" v-for="item in list" :key="item.Source" @click="handleTabsClick(item)">{{ item.PermissionName }} ({{ item.TotalNum }})</span>
  13. </div>
  14. <!-- -->
  15. <div class="son-box" v-if="showSelectBox || activeName == 15">
  16. <div style="display: flex; align-items: center" v-if="activeName === 2 && showSelectBox">
  17. <el-checkbox-group v-model="checkActiveList" @change="dataChangeHandler">
  18. <el-checkbox :label="item.key" v-for="item in screenList" :key="item.key">{{ item.name }}</el-checkbox>
  19. </el-checkbox-group>
  20. <el-checkbox-group style="margin-left: 25px" v-model="checkMeetingList" @change="dataChangeHandler">
  21. <el-checkbox :label="item.key" v-for="item in meetingList" :key="item.key">{{ item.name }}</el-checkbox>
  22. </el-checkbox-group>
  23. <el-tooltip class="tooltip-item" effect="dark" content="线上活动设置预约外呼/会议提醒/预约纪要,线下活动报名/预约纪要,但实际未参会的活动" placement="top-start">
  24. <i class="el-icon-info"></i>
  25. </el-tooltip>
  26. </div>
  27. <div class="dataReport-top">
  28. <date-picker
  29. v-model="filterObj.date"
  30. type="date"
  31. range
  32. value-type="format"
  33. :placeholder="activeName === 2 ? '活动时间' : activeName === 15 ? '路演时间' : '阅读时间'"
  34. :editable="false"
  35. @change="dateChange"
  36. style="width: 200px; margin-right: 20px"
  37. />
  38. <template v-if="showSelectBox">
  39. <button :class="['button-sty', { act: filterObj.month === item.label }]" v-for="item in monthLabel" @click="toggleMonth(item.label)" :key="item.label">
  40. {{ item.label }}
  41. </button>
  42. </template>
  43. <el-input v-if="activeName === 2 && showSelectBox" placeholder="活动名称" v-model="searchVal" style="width: 200px" @input="handleSearch" clearable>
  44. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  45. </el-input>
  46. <a :href="exportExcel" download>
  47. <button class="button-sty act">下载EXCEL</button>
  48. </a>
  49. </div>
  50. </div>
  51. <template v-if="activeName != 4">
  52. <el-table style="margin-top: 20px" :data="tableData" v-loading="tableLoading" element-loading-text="数据加载中..." border>
  53. <el-table-column v-for="item in tableColumsList" :key="item.label" :label="item.label" :width="item.widthsty" :min-width="item.minwidthsty" align="center">
  54. <template slot-scope="{ row }">
  55. <span v-if="item.key !== 'LabelKeyWord'" @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key)">{{ handleRowContent(row, item.key) }}</span>
  56. <div v-else>
  57. <template v-if="row.LabelKeyWord">
  58. <el-tag style="margin: 5px" type="info" size="small" v-for="tag in row.LabelKeyWord.split(',')" :key="tag">{{ tag }}</el-tag>
  59. </template>
  60. </div>
  61. </template>
  62. </el-table-column>
  63. <div slot="empty" style="padding: 20px 0">
  64. <img src="~@/assets/img/data_m/table_no.png" alt="" style="display: block; width: 135px; height: 90px; margin: 0 auto" />
  65. <span>暂无数据</span>
  66. </div>
  67. </el-table>
  68. <el-col :span="24" class="toolbar">
  69. <m-page :total="total" :page_no="page_no" :pageSize="10" @handleCurrentChange="handleCurrentChange" />
  70. </el-col>
  71. </template>
  72. <template v-else>
  73. <template v-if="chartList.length > 0">
  74. <div style="margin-top: 20px" class="chart-list" ref="listChartPage" @scroll="loadMorePublicChart">
  75. <div class="chart-item" v-for="item in chartList" :key="item.ChartId" @click="chartDetial(item)">
  76. <img class="item-img" :src="item.BodyHtml" />
  77. <p class="text_twoLine title-chart">{{ item.Title }}</p>
  78. <div class="chart-tag">
  79. <template v-if="item.CtagNamePc">
  80. <span class="tag-item" v-for="val in item.CtagNamePc.split(',')" :key="val">{{ val }}</span>
  81. </template>
  82. </div>
  83. <p class="tiem">收藏时间:{{ item.CreateTime }}</p>
  84. </div>
  85. </div>
  86. </template>
  87. <template v-else>
  88. <img src="~@/assets/img/data_m/table_no.png" alt="" style="display: block; width: 135px; height: 90px; margin: 30px auto" />
  89. <p class="chart-no-data">暂无收藏的图表</p>
  90. </template>
  91. </template>
  92. </el-card>
  93. <!-- <special-research-dlg /> -->
  94. <special-research-dlg :specialDetailId="specialDetailId" :dialogVisibleActivity.sync="dialogVisibleActivity" :dialogTitle="dialogTitle" :tabsActive="1" />
  95. </div>
  96. </template>
  97. <script>
  98. import { customInterence, equityContacts } from "@/api/api.js";
  99. import { tableColums, screenList, meetingList } from "./compontents/contactsColums";
  100. import mPage from "@/components/mPage.vue";
  101. import { mutualMixin } from "./mixins/mutualAssistance";
  102. import SpecialResearchDlg from "../../rai_manage/components/special/specialResearchDlg.vue";
  103. var moment = require("moment");
  104. moment().format();
  105. export default {
  106. name: "",
  107. components: { mPage, SpecialResearchDlg },
  108. props: {},
  109. computed: {
  110. exportExcel() {
  111. let baseUrl = process.env.API_ROOT + "/cygx/user/interaction/detail";
  112. let token = localStorage.getItem("auth") || "";
  113. let paramStr = "";
  114. let params = {
  115. UserId: Number(this.$route.query.id),
  116. Source: this.activeName,
  117. IsMeeting: this.checkMeetingList.join(","),
  118. MeetType: this.checkActiveList.join(","),
  119. EndDate: this.end_date,
  120. StartDate: this.start_date,
  121. KeyWord: this.searchVal,
  122. ClassType: this.activeTypeName,
  123. IsExport:true
  124. };
  125. for (let key in params) {
  126. paramStr = `${paramStr}&${key}=${params[key]}`;
  127. }
  128. return `${baseUrl}?${token}${paramStr}`;
  129. },
  130. },
  131. data() {
  132. return {};
  133. },
  134. mixins: [mutualMixin],
  135. created() {},
  136. mounted() {
  137. this.tableColums = tableColums(1);
  138. this.getCygxMutualList();
  139. },
  140. methods: {
  141. // 类型的点击事件
  142. typeHandleClick(item) {
  143. if (this.activeTypeName == item.value) return;
  144. this.activeTypeName = item.value;
  145. this.activeName = 1;
  146. this.tableColums = tableColums(this.activeName);
  147. this.getCygxMutualList();
  148. },
  149. //获取基础数据
  150. async getCygxMutualList() {
  151. const res = await equityContacts.getCygxMutualList({
  152. UserId: Number(this.$route.query.id),
  153. ClassType: this.activeTypeName,
  154. });
  155. if (res.Ret === 200) {
  156. this.list = res.Data.List || [];
  157. this.userForm = res.Data;
  158. this.getTableData();
  159. }
  160. },
  161. //获取表格数据
  162. async getTableData() {
  163. this.tableLoading = true;
  164. const res = await equityContacts.getCygxMutualDetail({
  165. UserId: Number(this.$route.query.id),
  166. Source: this.activeName,
  167. PageSize: this.pageSize,
  168. CurrentIndex: this.page_no,
  169. IsMeeting: this.checkMeetingList.join(","),
  170. MeetType: this.checkActiveList.join(","),
  171. EndDate: this.end_date,
  172. StartDate: this.start_date,
  173. ClassType: this.activeTypeName,
  174. KeyWord: this.searchVal,
  175. });
  176. if (res.Ret === 200) {
  177. this.total = res.Data.Paging.Totals;
  178. this.tableLoading = false;
  179. this.tableData = res.Data.List || [];
  180. }
  181. },
  182. async getChartData() {
  183. const res = await equityContacts.getCygxMutualDetail({
  184. UserId: Number(this.$route.query.id),
  185. Source: this.activeName,
  186. PageSize: this.pageSize,
  187. CurrentIndex: this.page_no,
  188. ClassType: this.activeTypeName,
  189. });
  190. if (res.Ret === 200) {
  191. this.publicHaveMove = res.Data ? this.page_no < res.Data.Paging.Pages : false;
  192. this.chartList = res.Data ? (this.page_no === 1 ? res.Data.List : [...this.chartList, ...res.Data.List]) : [];
  193. }
  194. },
  195. //一级的点击事件
  196. handleTabsClick(item) {
  197. if (this.activeName != item.Source) {
  198. this.activeName = item.Source;
  199. this.tableColums = tableColums(this.activeName);
  200. }
  201. this.checkActiveList = [1, 2]; //活动的方式
  202. this.checkMeetingList = [1, 2]; //是否到会
  203. this.filterObj = {
  204. month: "",
  205. date: [],
  206. };
  207. this.end_date = "";
  208. this.start_date = "";
  209. this.searchVal = "";
  210. this.chartList = [];
  211. this.page_no = 1;
  212. if (this.activeName !== 4) {
  213. this.getTableData();
  214. } else {
  215. this.getChartData();
  216. }
  217. },
  218. chartDetial(item) {
  219. window.open(item.HttpUrl, "_blank");
  220. },
  221. // 机构互助详情
  222. goWholeDetail() {
  223. const { href } = this.$router.resolve({
  224. path: "/organizationList",
  225. query: {
  226. id: this.$route.query.id,
  227. CompanyId: this.$route.query.CompanyId,
  228. },
  229. });
  230. window.open(href, "_blank");
  231. },
  232. },
  233. };
  234. </script>
  235. <style scoped lang="scss">
  236. .container-mutualList {
  237. .intro {
  238. display: inline-block;
  239. padding: 10px 20px;
  240. color: #2d8cf0;
  241. background: #e8f3ff;
  242. border-radius: 4px;
  243. }
  244. @import "./compontents/details.scss";
  245. .organization-details {
  246. display: inline-block;
  247. margin-left: 20px;
  248. cursor: pointer;
  249. font-size: 14px;
  250. color: #3385ff;
  251. }
  252. }
  253. </style>
  254. <style>
  255. .el-tabs__nav-wrap::after {
  256. background-color: rgba(255, 255, 255, 0.5);
  257. }
  258. </style>