| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- import pullUpRefresh from "@/utils/pullUpRefresh";
- import dayjs from "dayjs";
- export default {
- mixins: [pullUpRefresh],
-
- computed: {
- currentIndex() {
- return this.queryParams.type == 1 ? 0 : 1;
- }
- },
- onPullDownRefresh() {
- uni.stopPullDownRefresh();
- // 刷新
-
- },
- data() {
- return {
- clueStateList: [],
- mapHeight: "0px",
- key: new Date().getTime(),
- clueTagGroupVoList: [],
- dicts: {
- caseStatusDicts: [],
- crmFollowStatus: [],
- crmCallStatus: [],
- clueEntranceType: [],
- crmClueBiz: [],
- crmClueObj: [],
- crmClueType: []
- },
- options: [{
- value: "3",
- label: "电话/微信"
- },
- {
- value: "1",
- label: "姓名"
- },
- {
- value: "8",
- label: "广告主ID"
- },
- {
- value: "7",
- label: "广告主名称"
- },
- {
- value: "10",
- label: "广告ID"
- },
- {
- value: "9",
- label: "广告名称"
- },
- {
- value: "11",
- label: "标题ID"
- },
- {
- value: "12",
- label: "视频ID"
- },
- {
- value: "5",
- label: "qq号"
- },
- {
- value: "6",
- label: "邮箱"
- },
- {
- value: "2",
- label: "线索ID"
- },
- ],
- queryParams: {
- name: undefined,
- telephone: undefined,
- weixin: undefined,
- createTimeStart: dayjs().format("YYYY-MM-DD"),
- createTimeEnd: dayjs().format("YYYY-MM-DD"),
- conditionContent: undefined,
- condition: "3",
- batchCodes: [],
- clueIds: [],
- deptName: undefined,
- deptId: undefined,
- type: "1",
- pageNum: 1,
- pageSize: 20,
- allTagList: [],
- clueStateList: [],
- followStatusList: [],
- handleStateList: [],
- convertStatusList: [],
- followCountStart: undefined,
- followCountEnd: undefined,
- autoProvince: undefined,
- autoCity: undefined,
- autoArea: undefined,
- manualProvince: undefined,
- manualCity: undefined,
- manualArea: undefined,
- clueEntranceType: [],
- clueBizType: undefined,
- clueObjType: undefined,
- clueAdType: undefined,
- clueOperationId: undefined,
- clueOwnerId: undefined,
- sort: undefined,
- clueState: undefined,
- sortField: undefined,
- appNames: [],
- appNameLabel: undefined,
- isRepetitionOperWeixinName : '',
- isRepetitionOperationName : '',
- isVideoIdIsNull : '',
- advName: "",
- promotionName: "",
- advId: "",
- promotionId: "",
- titleId: "",
- videoId: ""
- },
- }
- },
- onPullDownRefresh() {
- uni.stopPullDownRefresh();
- this.resetData();
- },
- mounted() {
- uni.getSystemInfo({
- success: (e) => {
- const {
- windowTop,
- windowBottom,
- windowHeight
- } = e;
- this.mapHeight = (windowHeight - 70) + 'px';
- }
- });
- this.getDicts();
- // this.handleLoadData();
- this.resetData();
- },
- // onShow() {
- // this.resetData();
- // },
- methods: {
- handleAddClue() {
- uni.navigateTo({
- url: "/pages/addClue/index"
- })
- },
- handleClueStateClick(item) {
- this.queryParams.clueState = item.clueState;
- this.resetData();
- },
- handleKeyword() {
- this.resetData();
- },
- handleKeywordClear() {
- // 组件有bug 清空后的值还是存在
- this.queryParams.conditionContent = "";
- this.resetData();
- },
- handleShowTag() {
- this.$refs.clueTag.showModal();
- },
- async handleClueTagConfirm() {
- this.resetData();
- },
- async getDicts() {
- this.$getDicts('crm_clue_phase').then(res => {
- this.dicts.caseStatusDicts = res;
- });
- this.$getDicts('crm_follow_status').then(res => {
- this.dicts.crmFollowStatus = res;
- })
- this.$getDicts('crm_call_status').then(res => {
- this.dicts.crmCallStatus = res;
- })
- this.$getDicts('clue_entrance_type').then(res => {
- this.dicts.clueEntranceType = res;
- });
- this.$getDicts('crm_clue_biz').then(res => {
- this.dicts.crmClueBiz = res;
- });
- this.$getDicts('crm_clue_obj').then(res => {
- this.dicts.crmClueObj = res;
- });
- this.$getDicts('crm_clue_type').then(res => {
- this.dicts.crmClueType = res;
- });
- uni.$u.api.getClueTagGroupVoList({ tagGroupApplication : '1' }).then(({
- data
- }) => {
- this.clueTagGroupVoList = data;
- });
- },
- getOtherData() {
- this.statisticsCaseState();
- },
- async statisticsCaseState() {
- const {
- data
- } = await uni.$u.api.statisticsCaseState(this.queryParams);
- this.clueStateList = data;
- },
- handleshowFilter() {
- this.$refs.filter.show();
- },
- handleShowSort() {
- this.$refs.sort.show();
- },
- sectionChange(val) {
- this.queryParams.type = val == 0 ? 1 : 2;
- this.resetData();
- },
- handleConfirm() {
- this.resetData();
- },
- handleConditionChange() {
- if (this.queryParams.conditionContent) {
- this.resetData();
- }
- },
- handleToDetail(item) {
- const {
- id,
- name
- } = item;
- uni.navigateTo({
- url: `/pages/clueDetail/index?clueId=${id}&name=${name}&type=${this.queryParams.type}`,
- });
- },
- async getList() {
- const {
- pageNum,
- pageSize,
- ...params
- } = this.queryParams;
- const {
- rows,
- total
- } = await uni.$u.api.getClueMainInfoList({
- pageSize,
- pageNum
- }, params);
- rows.forEach(v=>{
- if(v.repetitionOperationName){
- // 按逗号分割成数组
- const parts = v.repetitionOperationName.split(',');
- // 对每个部分提取 '-' 前面的内容
- const result = parts.map(part => part.split('-')[0]).join(',');
- v.repetitionOperationName = result;
- }
- if(v.repetitionOperWeixinName){
- // 按逗号分割成数组
- const parts = v.repetitionOperWeixinName.split(',');
- // 对每个部分提取 '-' 前面的内容
- const result = parts.map(part => part.split('-')[0]).join(',');
- v.repetitionOperWeixinName = result;
- }
- })
-
- return rows;
- }
- }
- }
|