Przeglądaj źródła

Merge branch 'master' of http://git.shengws.com/zhangbj/scrm-vue

zhengchengwu 5 lat temu
rodzic
commit
d61e71904a

+ 9 - 0
src/api/act/submitinfo.js Wyświetl plik

@@ -16,4 +16,13 @@ export function getArticleType(params){
16 16
          method: 'Get',
17 17
          params: params
18 18
      })
19
+}
20
+
21
+export function GetAllArticles(params){
22
+     console.log("文章列表")
23
+     return request({
24
+         url:'/api/acticle/getAllArticles',
25
+         method:'Get',
26
+         params:params
27
+     })
19 28
 }

+ 14 - 0
src/api/activity/activity.js Wyświetl plik

@@ -0,0 +1,14 @@
1
+import request from "@/utils/request"
2
+
3
+export function fetchActivities(page, keyword, status) {
4
+  const params = {
5
+    page: page,
6
+    keyword: keyword,
7
+    status: status,
8
+  }
9
+  return request({
10
+    url: '/api/activities',
11
+    method: 'get',
12
+    params: params,
13
+  })
14
+}

BIN
src/assets/img/activity_poster_photo_default.png Wyświetl plik


BIN
src/assets/img/sa_06.png Wyświetl plik


BIN
src/assets/img/sa_13.png Wyświetl plik


BIN
src/assets/img/sa_21.png Wyświetl plik


BIN
src/assets/img/sa_24.png Wyświetl plik


BIN
src/assets/img/sa_25.png Wyświetl plik


BIN
src/assets/img/sa_26.png Wyświetl plik


BIN
src/assets/img/sa_52.png Wyświetl plik


BIN
src/assets/img/sa_7.png Wyświetl plik


+ 4 - 0
src/lang/en.js Wyświetl plik

@@ -110,6 +110,10 @@ export default {
110 110
     special_permission_manage: 'Special Permission Manage',
111 111
     schedule_print: 'Print Schudule',
112 112
     dialysis_batch_print: 'Batch Print Order',
113
+    
114
+    marketingTool: "marketing tools",
115
+    activityList: "activity list",
116
+    activityPublish: "publish activity",
113 117
     systemsetting:'Systemsetting'
114 118
   },
115 119
   navbar: {

+ 4 - 0
src/lang/zh.js Wyświetl plik

@@ -158,6 +158,10 @@ export default {
158 158
     stockOutDetail: '出库单详情',
159 159
     cancelStockDetail: '退库单详情',
160 160
     stockDetail: '出入库明细查询',
161
+
162
+    marketingTool: "营销工具",
163
+    activityList: "活动列表",
164
+    activityPublish: "发布活动",
161 165
     systemsetting:'系统设置',
162 166
     staffmanagement:'员工管理'
163 167
   },

+ 3 - 1
src/router/index.js Wyświetl plik

@@ -10,7 +10,8 @@ import role from './modules/role'
10 10
 import article from './modules/article'
11 11
 import member from './modules/member'
12 12
 import org from './modules/org'
13
-import system from './modules/system';
13
+import marketing_tool from './modules/marketing_tool'
14
+import system from './modules/system'
14 15
 
15 16
 /** note: submenu only apppear when children.length>=1
16 17
  *   detail see  https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
@@ -73,6 +74,7 @@ var _constant_router_map = [{
73 74
 var _asy_router_map = [
74 75
   member,
75 76
   article,
77
+  marketing_tool,
76 78
   org,
77 79
   role,
78 80
   system

+ 32 - 0
src/router/modules/marketing_tool.js Wyświetl plik

@@ -0,0 +1,32 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  alwaysShow: true,
5
+  path: '/activity',
6
+  component: Layout,
7
+  redirect: 'noredirect',
8
+  name: 'marketingTool',
9
+  meta: {
10
+    title: 'marketingTool',
11
+    icon: 'component'
12
+  },
13
+  children: [{
14
+      path: '/activity/publish',
15
+      component: () => import('@/scrm_pages/marketing_tool/activity_publish'),
16
+      name: 'activityPublish',
17
+      meta: {
18
+        title: 'activityPublish',
19
+        noCache: true
20
+      }
21
+    },
22
+    {
23
+      path: '/activity/list',
24
+      component: () => import('@/scrm_pages/marketing_tool/activity_list'),
25
+      name: 'activityList',
26
+      meta: {
27
+        title: 'activityList',
28
+        noCache: true
29
+      }
30
+    },
31
+  ]
32
+}

+ 54 - 26
src/scrm_pages/article/articleList.vue Wyświetl plik

@@ -8,7 +8,7 @@
8 8
           <div style="margin-bottom: 10px">
9 9
             <el-row :gutter="24">
10 10
               <el-col :span="8">
11
-                  <el-input style="width: 300px"  placeholder="请输入您需要搜索的内容"></el-input>
11
+                  <el-input style="width: 300px" v-model="listQuery.search"  placeholder="请输入您需要搜索的内容"></el-input>
12 12
                   <el-button type="primary"  icon="el-icon-search">搜索</el-button>
13 13
               </el-col>
14 14
             </el-row>
@@ -17,7 +17,8 @@
17 17
             <label class="title"><span class="name">标签</span>:</label>
18 18
              <div class="time">
19 19
                 <ul class="">
20
-                  <li :class="item.value==schedulType?'active':''"  v-for="item in schedulArr" :key="item.value">{{item.label}}</li>
20
+                  <li :class="0==schedulType?'active':''" @click="selectsign(0)">全部</li>
21
+                  <li :class="item.MenuId==schedulType?'active':''"  v-for="item in schedulArr" :key="item.MenuId">{{item.Name}}</li>
21 22
                 </ul>
22 23
              </div>
23 24
           </div>
@@ -25,15 +26,16 @@
25 26
             <label class="title"><span class="name">状态:</span></label>
26 27
             <div class="time">
27 28
               <ul class="">
29
+                <!-- <li :class="0==systemType?'active':''" @click="selectStatus(0)">全部</li> -->
28 30
                 <li :class="item.value==systemType?'active':''" v-for="item in systemArr" :key="item.value">{{item.label}}</li>
29 31
               </ul>
30 32
             </div>
31 33
           </div>
32 34
           <div class="filter-container" style="margin-top: 10px;margin-left: 5px">
33
-            <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
34
-            <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
35
+            <el-checkbox style="width: 30px">全选</el-checkbox>
36
+            <el-button size="small" icon="el-icon-delete">删除</el-button>
35 37
           </div>
36
-          <el-table ref="multipleTable" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :data="tableData" border fit highlight-current-row  style="width: 100%;margin-top: 10px;">
38
+          <el-table ref="multipleTable" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :data="ArticleData" border fit highlight-current-row  style="width: 100%;margin-top: 10px;">
37 39
               <el-table-column
38 40
                 type="selection"
39 41
                 width="55">
@@ -92,6 +94,7 @@
92 94
 
93 95
 <script>
94 96
   import BreadCrumb from '../components/bread-crumb'
97
+  import { GetAllArticles } from '@/api/act/submitinfo'
95 98
   export default {
96 99
     name: 'commentList',
97 100
     components:{
@@ -106,34 +109,59 @@
106 109
         time: '',
107 110
         active: true,
108 111
         schedulType: 0,
109
-        schedulArr:[
110
-          {value: 0, label: '全部'},
111
-          {value: 1, label: '食物库'},
112
-          {value: 2, label: '肾病常识'},
113
-          {value: 3, label: '科普教育'},
114
-        ],
112
+        schedulArr:0,
115 113
         systemType: 0,
116 114
         systemArr: [
117
-          { value: 0, label: '全部' },
118
-          { value: 1, label: '已发布'},
119
-          { value: 2, label: '草稿箱'},
120
-          { value: 3, label: '未通过'},
115
+          { value: 0, label: "全部" },
116
+          { value: 1, label: "已发布" },
117
+          { value: 2, label: "草稿箱" },
118
+          { value: 2, label: "未通过" }
121 119
         ],
120
+        listQuery:{
121
+            page:1,
122
+            limit:10,
123
+            search:'',
124
+            classid:'',
125
+        },
126
+        ArticleData:[],
127
+        total:0,
122 128
       }
129
+    },
130
+    methods:{
131
+         GetAllArticles(){
132
+              GetAllArticles(this.listQuery).then(response =>{
133
+                     if(response.data.status === 1){
134
+                       this.ArticleData = response.data.data.articles
135
+                        console.log("文章列表",this.ArticleData)
136
+                        this.total = response.data.data.total
137
+                     }
138
+              })
139
+         },
140
+         selectsign(id){
141
+            this.listQuery.classid = id;
142
+            this.schedulArr = id;
143
+            this.GetAllArticles();
144
+         },
145
+         selectStatus(id){
146
+            this.listQuery.status = id;
147
+            this.systemType = id;
148
+            this.GetAllArticles();
149
+         },
150
+          handleSizeChange(limit) {
151
+            this.listQuery.limit = limit;
152
+            this.GetAllAritcles();
153
+        },
154
+         handleCurrentChange(page) {
155
+            this.listQuery.page = page;
156
+            this.GetAllAritcles();
157
+        }
158
+    },
159
+    created(){
160
+      this.GetAllArticles()
123 161
     }
124 162
   }
125 163
 </script>
126 164
 
127 165
 <style scoped>
128
-  /*.app-container .cell.clearfix .time ul li {*/
129
-    /*float: left;*/
130
-    /*list-style: none;*/
131
-    /*cursor: pointer;*/
132
-    /*padding: 6px 20px;*/
133
-    /*color: #606266;*/
134
-    /*border-radius: 4px;*/
135
-    /*margin: 0 8px 0 0;*/
136
-    /*font-size: 14px;*/
137
-    /*text-align: center;*/
138
-  /*}*/
166
+     
139 167
 </style>

+ 29 - 11
src/scrm_pages/article/createArticle.vue Wyświetl plik

@@ -79,12 +79,12 @@
79 79
                 </el-col>
80 80
               </el-form-item>
81 81
                <el-form-item label="所属分类:">
82
-                 <el-select v-model="value" placeholder="请先选择文章所属分类" prop="act_type">
82
+                 <el-select v-model="form.act_type" placeholder="请先选择文章所属分类"  @change="changeActtype()">
83 83
                    <el-option
84 84
                      v-for="item in options"
85
-                     :key="item.id"
85
+                     :key="item.MenuId"
86 86
                      :label="item.Name"
87
-                     :value="item.id">
87
+                     :value="item.MenuId">
88 88
                    </el-option>
89 89
                  </el-select>
90 90
                </el-form-item>
@@ -94,7 +94,7 @@
94 94
           <el-row :span="24">
95 95
             <el-col :span="24">
96 96
                 <el-form-item>
97
-                      <el-button size="small" type="primary" style="width: 100px"  @click="submitForm" :disabled="formsubmit">发布</el-button>
97
+                      <el-button size="small" type="primary" style="width: 100px"  @click="submitForm;centerDialogVisible = true" :disabled="formsubmit">发布</el-button>
98 98
                       <el-button size="small" style="width: 100px">预览</el-button>
99 99
                       <el-button size="small" style="width: 100px">保存草稿</el-button>
100 100
                   <el-button size="small" style="width: 100px">取消</el-button>
@@ -170,6 +170,17 @@
170 170
     </el-tabs>
171 171
      </div>
172 172
     </div>
173
+      <el-dialog
174
+        title="发布成功"
175
+        :visible.sync="centerDialogVisible"
176
+         width="30%"
177
+         center>
178
+         <!-- <span>需要注意的是内容是默认不居中的</span> -->
179
+         <span slot="footer" class="dialog-footer">
180
+        <el-button @click="gotolink;centerDialogVisible = false">再发一条</el-button>
181
+        <el-button type="primary" @click="gobacklist">返回文章列表</el-button>
182
+       </span>
183
+      </el-dialog>
173 184
   </div>
174 185
 </template>
175 186
 
@@ -239,6 +250,7 @@
239 250
                 // 关闭自动保存
240 251
                 enableAutoSave: false
241 252
             },
253
+         centerDialogVisible: false,
242 254
       }
243 255
     },
244 256
     created(){
@@ -417,24 +429,24 @@
417 429
       beforeRemove(file, fileList) {
418 430
         return this.$confirm(`确定移除 ${ file.name }?`);
419 431
       },
432
+      changeActtype(){
433
+         console.log("所属分类",this.form.act_type)
434
+      },
420 435
       submitForm(){
421 436
         var params  = new Object()
422 437
         params.act_name = this.form.act_name
423 438
         params.act_content = this.$refs.neditor.content
424 439
         params.org_logo = this.form.org_logo
440
+        params.act_type = this.form.act_type
425 441
         this.formloading=true
426 442
         this.submitForm =true
427 443
         console.log("文章标题",params.act_name)
428 444
         console.log("文章内容",params.act_content)
429 445
         console.log("富文本编辑器的内容",params.act_content)
430
-        console.log("图片",params.org_logo)
446
+        console.log("图片",params.org_logo)  
447
+        console.log("所属分类",params.act_type)    
431 448
         submitForm(params).then(response => {
432
-           if(response.data.state === 1){
433
-             this.$message({
434
-               type: 'success',
435
-               message: '成功!'
436
-             })
437
-           }
449
+         
438 450
         })
439 451
       },
440 452
       getArticleType(){
@@ -447,6 +459,12 @@
447 459
              console.log("文章",this.options)
448 460
             }
449 461
         })
462
+      },
463
+      gotolink(){
464
+        this.$router.push({path:"/articles/createArticle"})
465
+      },
466
+      gobacklist(){
467
+        this.$router.push({path:'/articles/articleList'})
450 468
       }
451 469
     },
452 470
   }

+ 115 - 0
src/scrm_pages/marketing_tool/activity_list.vue Wyświetl plik

@@ -0,0 +1,115 @@
1
+<template>
2
+  <div class="main-contain" v-loading="loading_activities">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-button
6
+        :disabled="$store.getters.xt_user.subscibe.state==3?true:false"
7
+        @click="$router.push({path:'/activity/publish'})"
8
+        class="filter-item"
9
+        style="float:right;"
10
+        type="primary"
11
+        icon="el-icon-circle-plus-outline"
12
+        size="small"
13
+      >创建活动</el-button>
14
+    </div>
15
+    <div class="app-container">
16
+      <div class="cell clearfix">
17
+        <el-input v-model="keyword" placeholder="请输入您要搜索的活动" class="keyword_input"></el-input>
18
+        <el-button type="primary" icon="el-icon-search" @click="getActivities()">搜索</el-button>
19
+      </div>
20
+      <div class="cell clearfix">
21
+        <label class="title">
22
+          <span class="name">状态</span> :
23
+        </label>
24
+        <div class="time">
25
+          <ul>
26
+            <li :class="{ active: selecting_status == 0 }" @click="changeSelectingStatus(0)">全部</li>
27
+            <li :class="{ active: selecting_status == 1 }" @click="changeSelectingStatus(1)">已发布</li>
28
+            <li :class="{ active: selecting_status == 2 }" @click="changeSelectingStatus(2)">待发布</li>
29
+            <li :class="{ active: selecting_status == 3 }" @click="changeSelectingStatus(3)">未通过</li>
30
+            <li :class="{ active: selecting_status == 4 }" @click="changeSelectingStatus(4)">已结束</li>
31
+          </ul>
32
+        </div>
33
+      </div>
34
+      <div>
35
+        <template v-for="(activity, index) in activities">
36
+          <published-cell v-if="activity.status == 1 || activity.status == 4" :key="index" :activity="activity"></published-cell>
37
+          <unapproved-cell v-else-if="activity.status == 3" :key="index" :activity="activity"></unapproved-cell>
38
+          <drafts-cell v-else-if="activity.status == 2" :key="index" :activity="activity"></drafts-cell>
39
+        </template>
40
+      </div>
41
+      <div class="cell clearfix" style="padding-top: 15px;">
42
+          <el-pagination :total="activity_total" :current-page.sync="current_page" :page-size="10" layout="total, prev, pager, next" @current-change="getActivities()"></el-pagination>
43
+      </div>
44
+    </div>
45
+  </div>
46
+</template>
47
+
48
+<script>
49
+import BreadCrumb from "@/scrm_pages/components/bread-crumb";
50
+import PublishedCell from "@/scrm_pages/marketing_tool/components/published_cell"
51
+import UnapprovedCell from "@/scrm_pages/marketing_tool/components/unapproved_cell"
52
+import DraftsCell from "@/scrm_pages/marketing_tool/components/drafts_cell"
53
+import { fetchActivities } from "@/api/activity/activity"
54
+
55
+export default {
56
+  name: "ActivityList",
57
+  components: {
58
+    BreadCrumb,
59
+    PublishedCell,
60
+    UnapprovedCell,
61
+    DraftsCell,
62
+  },
63
+  data() {
64
+    return {
65
+      crumbs: [
66
+        { path: false, name: "营销工具" },
67
+        { path: false, name: "活动列表" }
68
+      ],
69
+      keyword: "",
70
+      selecting_status: 0,
71
+      activity_total: 0,
72
+      current_page: 1,
73
+
74
+      loading_activities: false,
75
+      activities: [],
76
+    };
77
+  },
78
+  mounted() {
79
+      this.getActivities()
80
+  },
81
+  methods: {
82
+    changeSelectingStatus(status) {
83
+      this.selecting_status = status
84
+      this.getActivities()
85
+    },
86
+
87
+    getActivities() {
88
+      this.loading_activities = true
89
+      fetchActivities(this.current_page, this.keyword, this.selecting_status).then(rs => {
90
+        this.loading_activities = false
91
+        var resp = rs.data
92
+        if (resp.state == 1) {
93
+          this.activities = resp.data.activities
94
+          this.activity_total = resp.data.total
95
+          console.log(this.activities)
96
+
97
+        } else {
98
+          this.$message.error(resp.msg)
99
+        }
100
+      }).catch(err => {
101
+        this.loading_activities = false
102
+        this.$message.error(err)
103
+      })
104
+    },
105
+  },
106
+};
107
+</script>
108
+
109
+<style scoped>
110
+.keyword_input {
111
+  width: 330px;
112
+}
113
+</style>
114
+
115
+

+ 61 - 0
src/scrm_pages/marketing_tool/activity_publish.vue Wyświetl plik

@@ -0,0 +1,61 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        </div>
6
+        <div class="app-container" style="padding: 0 20px; background-color: #f6f8f9;">
7
+            <div class="edit-main">
8
+                <div class="preview-panel">
9
+                    <preview-form></preview-form>
10
+                </div>
11
+                <div class="edit-panel">
12
+                    <edit-form></edit-form>
13
+                </div>
14
+            </div>
15
+        </div>
16
+    </div>
17
+</template>
18
+
19
+<script>
20
+import BreadCrumb from "@/scrm_pages/components/bread-crumb";
21
+import PreviewForm from "@/scrm_pages/marketing_tool/components/edit_activity_preview_form"
22
+import EditForm from "@/scrm_pages/marketing_tool/components/edit_activity_edit_form"
23
+
24
+export default {
25
+    name: "ActivityPublish",
26
+    components: {
27
+        BreadCrumb,
28
+        PreviewForm,
29
+        EditForm,
30
+    },
31
+    data() {
32
+        return {
33
+            crumbs: [
34
+                { path: false, name: "营销工具" },
35
+                { path: false, name: "发布活动" }
36
+            ],
37
+        }
38
+    },
39
+}
40
+</script>
41
+
42
+<style scoped rel="stylesheet/scss" lang="scss">
43
+.edit-main {
44
+    width: 100%;
45
+    display: flex;
46
+    min-height: 600px;
47
+    height: auto;
48
+    box-sizing: border-box;
49
+
50
+    .preview-panel {
51
+        flex: 3;
52
+        margin-right: 1rem;
53
+        background-color: #fff;
54
+    }
55
+    .edit-panel {
56
+        flex: 4;
57
+        padding-bottom: 80px;
58
+        background-color: #fff;
59
+    }
60
+}
61
+</style>

+ 123 - 0
src/scrm_pages/marketing_tool/components/drafts_cell.vue Wyświetl plik

@@ -0,0 +1,123 @@
1
+<template>
2
+<div class="clearfix">
3
+    <div class="drafts-cell">
4
+        <div class="activity-image-panel">
5
+            <span class="status-text">待发布</span>
6
+            <img :src="activity.poster_photo" />
7
+        </div>
8
+        <div class="activity-info-panel">
9
+            <h3 class="title">
10
+                <a href="/">{{ activity.title }}</a>
11
+            </h3>
12
+            <div class="operation">
13
+                <el-button type="primary" size="small" icon="el-icon-edit-outline">编辑</el-button>
14
+                <el-button type="danger" size="small" icon="el-icon-delete">删除</el-button>
15
+            </div>
16
+        </div>
17
+    </div>
18
+</div>
19
+</template>
20
+
21
+<script>
22
+export default {
23
+    name: "DraftsActivityCell",
24
+    props: {
25
+        activity: {
26
+            type: Object,
27
+            required: true,
28
+        }
29
+    },
30
+    data() {
31
+        return {
32
+            
33
+        }
34
+    },
35
+}
36
+</script>
37
+
38
+<style scoped rel="stylesheet/scss" lang="scss">
39
+.drafts-cell {
40
+    padding: 20px 15px;
41
+    border: none;
42
+    border-bottom: 1px solid #e5e8ea;
43
+    float: left;
44
+    margin: 0;
45
+    width: 100%;
46
+    border-radius: 0;
47
+    position: relative;
48
+
49
+    .activity-image-panel {
50
+        width: 155px;
51
+        height: 122px;
52
+        border: 1px #dee2e5 solid;
53
+        display: flex;
54
+        justify-content: center;
55
+        position: relative;
56
+        -webkit-border-radius: 4px;
57
+        -moz-border-radius: 4px;
58
+        border-radius: 4px;
59
+        overflow: hidden;
60
+        float: left;
61
+
62
+        .status-text {
63
+            position: absolute;
64
+            font-size: 12px;
65
+            color: #fff;
66
+            top: 14px;
67
+            left: 3px;
68
+            -webkit-transform: rotate(316deg);
69
+            transform: rotate(316deg);
70
+        }
71
+
72
+        img {
73
+            width: 100%;
74
+            height: 100%;
75
+            object-fit: cover;
76
+            object-position: center;
77
+        }
78
+    }
79
+    .activity-image-panel::before {
80
+        border-top: 28px solid #65d3e3;
81
+        border-right: 28px solid transparent;
82
+        border-bottom: 28px solid transparent;
83
+        border-left: 28px solid #65d3e3;
84
+        position: absolute;
85
+        top: 0;
86
+        left: 0;
87
+        width: 0;
88
+        height: 0;
89
+        display: block;
90
+        content: "";
91
+    }
92
+
93
+    .activity-info-panel {
94
+        padding: 7px 20px;
95
+        width: 60%;
96
+        float: left;
97
+
98
+        .title {
99
+            padding-bottom: 5px;
100
+
101
+            a {
102
+                color: #495060;
103
+                font-size: 20px;
104
+                max-width: 100%;
105
+                font-weight: 500;
106
+                overflow: hidden;
107
+                white-space: nowrap;
108
+                text-overflow: ellipsis;
109
+                display: inline-block;
110
+            }
111
+        }
112
+
113
+        .operation {
114
+            padding: 10px 0 0;
115
+        }
116
+    }
117
+}
118
+</style>
119
+
120
+
121
+
122
+
123
+

+ 14 - 0
src/scrm_pages/marketing_tool/components/edit_activity_edit_form.vue Wyświetl plik

@@ -0,0 +1,14 @@
1
+<template>
2
+    <div></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+    name: "EditActivityEditForm",
8
+}
9
+</script>
10
+
11
+<style lang="scss" scoped>
12
+
13
+</style>
14
+

+ 206 - 0
src/scrm_pages/marketing_tool/components/edit_activity_preview_form.vue Wyświetl plik

@@ -0,0 +1,206 @@
1
+<template>
2
+    <div class="preview-main">
3
+        <div class="form-title">
4
+            <img class="icon" src="@/assets/img/sa_06.png" />
5
+            <span>预览</span>
6
+        </div>
7
+        <div class="form-content">
8
+            <div class="preview-cell-poster-photo border">
9
+                <img class="poster-photo" :src="poster_photo" />
10
+                <div class="title-panel">
11
+                    <p class="title">{{ title }}</p>
12
+                    <p class="subtitle">{{ subtitle }}</p>
13
+                </div>
14
+            </div>
15
+            <div class="org-info-cell border">
16
+                <div class="logo">
17
+                    <img :src="poster_photo" />
18
+                </div>
19
+                <div class="text-info">
20
+                    <p class="name">测试机构</p>
21
+                    <p class="address">地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址</p>
22
+                </div>
23
+                <div class="arrow-panel">
24
+                    <img src="@/assets/img/sa_52.png" />
25
+                </div>
26
+            </div>
27
+            <div class="simple-cell border">
28
+                <div class="icon">
29
+                    <img src="@/assets/img/sa_21.png" />
30
+                </div>
31
+                <div class="text">
32
+                    <p>2019-01-01</p>
33
+                </div>
34
+                <div class="arrow-panel">
35
+                    <img src="@/assets/img/sa_52.png" />
36
+                </div>
37
+            </div>
38
+            <div class="simple-cell border">
39
+                <div class="icon">
40
+                    <img src="@/assets/img/sa_24.png" />
41
+                </div>
42
+                <div class="text">
43
+                    <p>0755-86879866</p>
44
+                </div>
45
+                <div class="arrow-panel">
46
+                    <img src="@/assets/img/sa_52.png" />
47
+                </div>
48
+            </div>
49
+        </div>
50
+    </div>
51
+</template>
52
+
53
+<script>
54
+export default {
55
+    name: "EditActivityPreviewForm",
56
+    data() {
57
+        return {
58
+            
59
+        }
60
+    },
61
+    computed: {
62
+        poster_photo: function() {
63
+            return require("@/assets/img/activity_poster_photo_default.png")
64
+        },
65
+        title: function() {
66
+            return "与孩子一起挑选采摘新鲜有机马陆葡萄,体验采摘乐趣"
67
+        },
68
+        subtitle: function() {
69
+            return "亲子采摘活动"
70
+        },
71
+    },
72
+}
73
+</script>
74
+
75
+<style lang="scss" scoped>
76
+.preview-main {
77
+    .form-title {
78
+        width: 100%;
79
+        padding: 20px 0 20px 30px;
80
+        border-bottom: 1px #dee2e5 solid;
81
+
82
+        .icon {
83
+            margin-top: -4px;
84
+            vertical-align: middle;
85
+        }
86
+
87
+        span {
88
+            font-size: 18px;
89
+            font-weight: 500;
90
+            color: #485b6d;
91
+            margin-left: 10px;
92
+        }
93
+    }
94
+
95
+    .form-content {
96
+        width: 100%;
97
+        padding: 14px 30px 0 30px;
98
+
99
+        .preview-cell-poster-photo {
100
+            .poster-photo {
101
+                width: 100%;
102
+            }
103
+
104
+            .title-panel {
105
+                padding: 15px 15px 16px 20px;
106
+
107
+                .title {
108
+                    font-size: 18px;
109
+                    color: #485b6d;
110
+                    font-weight: bold;
111
+                    line-height: 28px;
112
+                }
113
+
114
+                .subtitle {
115
+                    margin-top: 6px;
116
+                    color: #a6a6a6;
117
+                    font-size: 14px;
118
+                }
119
+            }
120
+        }
121
+
122
+        .org-info-cell {
123
+            padding: 20px 20px;
124
+            margin-top: 15px;
125
+            position: relative;
126
+            display: flex;
127
+            -webkit-box-align: center;
128
+            align-items: center;
129
+
130
+            .logo {
131
+                img {
132
+                    width: 40px;
133
+                    height: 40px;
134
+                    border-radius: 20px;
135
+                }
136
+            }
137
+            .text-info {
138
+                flex: 1;
139
+                padding-left: 17px;
140
+                color: #485b6d;
141
+
142
+                .name {
143
+                    font-size: 16px;
144
+                    line-height: 22px;
145
+                    font-weight: 500;
146
+                }
147
+                .address {
148
+                    font-size: 14px;
149
+                    line-height: 20px;
150
+                    margin-top: 5px;
151
+                }
152
+            }
153
+            .arrow-panel {
154
+                width: 20px;
155
+                position: relative;
156
+
157
+                img {
158
+                    width: 8px;
159
+                    float: right;
160
+                    vertical-align: middle;
161
+                }
162
+            }
163
+        }
164
+
165
+        .simple-cell {
166
+            padding: 20px 20px;
167
+            margin-top: 15px;
168
+            position: relative;
169
+            display: flex;
170
+            -webkit-box-align: center;
171
+            align-items: center;
172
+
173
+            .icon {
174
+                img {
175
+                    width: 20px;
176
+                    height: 20px;
177
+                    vertical-align: middle;
178
+                }
179
+            }
180
+            .text {
181
+                flex: 1;
182
+                padding-left: 17px;
183
+                color: #485b6d;
184
+                line-height: 20px;
185
+            }
186
+            .arrow-panel {
187
+                width: 20px;
188
+                position: relative;
189
+
190
+                img {
191
+                    width: 8px;
192
+                    float: right;
193
+                    vertical-align: middle;
194
+                }
195
+            }
196
+        }
197
+    }
198
+}
199
+</style>
200
+
201
+<style scoped>
202
+.border {
203
+    border: solid 1px #dee2e5;
204
+    border-radius: 4px;
205
+}
206
+</style>

+ 188 - 0
src/scrm_pages/marketing_tool/components/published_cell.vue Wyświetl plik

@@ -0,0 +1,188 @@
1
+<template>
2
+<div class="clearfix">
3
+    <div class="published-cell">
4
+        <div class="activity-image-panel">
5
+            <span class="status-text">{{ status_text }}</span>
6
+            <img :src="activity.poster_photo" />
7
+        </div>
8
+        <div class="activity-info-panel">
9
+            <h3 class="title">
10
+                <a href="">{{ activity.title }}</a>
11
+            </h3>
12
+            <div class="statistics">
13
+                阅读:{{ activity.read_num }} 丨 评论:{{ activity.comment_num }} 丨 点赞:{{ activity.star_num }}
14
+            </div>
15
+            <div class="progress">
16
+                <div class="progress-bar">
17
+                    <el-progress :percentage="progress_percent" :stroke-width="5" color="#409eff" :show-text="false" ></el-progress>
18
+                </div>
19
+                <span class="progress-text">{{ progress_text }}</span>
20
+            </div>
21
+        </div>
22
+        <div class="activity-time-panel">
23
+            <span class="time">{{ start_time }}</span>
24
+        </div>
25
+    </div>
26
+</div>
27
+</template>
28
+
29
+<script>
30
+import { parseTime } from "@/utils"
31
+
32
+export default {
33
+    name: "PublishedActivityCell",
34
+    props: {
35
+        activity: {
36
+            type: Object,
37
+            required: true,
38
+        }
39
+    },
40
+    data() {
41
+        return {
42
+            
43
+        }
44
+    },
45
+    computed: {
46
+        status_text: function() {
47
+            if (this.activity.status == 4) {
48
+                return "已结束"
49
+            } else if (this.activity.is_recommend == true) {
50
+                return "已推荐"
51
+            } else {
52
+                return "已发布"
53
+            }
54
+        },
55
+        progress_percent: function() {
56
+            if (this.activity.limit_num > 0) {
57
+                return (this.activity.join_num / this.activity.limit_num) * 100
58
+            } else {
59
+                return 100
60
+            }
61
+        },
62
+        progress_text: function() {
63
+            if (this.activity.limit_num > 0) {
64
+                if (this.activity.join_num >= this.activity.limit_num) {
65
+                    return "已报满"
66
+                } else {
67
+                    return this.activity.join_num + " / " + this.activity.limit_num
68
+                }
69
+            } else {
70
+                return "无限制"
71
+            }
72
+        },
73
+        start_time: function() {
74
+            return parseTime(this.activity.start_time, "{y}-{m}-{d}")
75
+        },
76
+    },
77
+}
78
+</script>
79
+
80
+<style scoped rel="stylesheet/scss" lang="scss">
81
+.published-cell {
82
+    padding: 20px 15px;
83
+    border: none;
84
+    border-bottom: 1px solid #e5e8ea;
85
+    float: left;
86
+    margin: 0;
87
+    width: 100%;
88
+    border-radius: 0;
89
+    position: relative;
90
+
91
+    .activity-image-panel {
92
+        width: 155px;
93
+        height: 122px;
94
+        border: 1px #dee2e5 solid;
95
+        display: flex;
96
+        justify-content: center;
97
+        position: relative;
98
+        -webkit-border-radius: 4px;
99
+        -moz-border-radius: 4px;
100
+        border-radius: 4px;
101
+        overflow: hidden;
102
+        float: left;
103
+
104
+        .status-text {
105
+            position: absolute;
106
+            font-size: 12px;
107
+            color: #fff;
108
+            top: 14px;
109
+            left: 3px;
110
+            -webkit-transform: rotate(316deg);
111
+            transform: rotate(316deg);
112
+        }
113
+
114
+        img {
115
+            width: 100%;
116
+            height: 100%;
117
+            object-fit: cover;
118
+            object-position: center;
119
+        }
120
+    }
121
+    .activity-image-panel::before {
122
+        border-top: 28px solid #5bd18b;
123
+        border-right: 28px solid transparent;
124
+        border-bottom: 28px solid transparent;
125
+        border-left: 28px solid #5bd18b;
126
+        position: absolute;
127
+        top: 0;
128
+        left: 0;
129
+        width: 0;
130
+        height: 0;
131
+        display: block;
132
+        content: "";
133
+    }
134
+
135
+    .activity-info-panel {
136
+        padding: 7px 20px;
137
+        width: 60%;
138
+        float: left;
139
+
140
+        .title {
141
+            padding-bottom: 5px;
142
+
143
+            a {
144
+                color: #495060;
145
+                font-size: 20px;
146
+                max-width: 100%;
147
+                font-weight: 500;
148
+                overflow: hidden;
149
+                white-space: nowrap;
150
+                text-overflow: ellipsis;
151
+                display: inline-block;
152
+            }
153
+        }
154
+
155
+        .statistics {
156
+            color: #a8b3ba;
157
+            font-size: 15px;
158
+            justify-content: space-between;
159
+            line-height: 30px;
160
+        }
161
+
162
+        .progress {
163
+            padding: 5px 0;
164
+
165
+            .progress-bar {
166
+                width: 60%;
167
+                display: inline-block;
168
+            }
169
+            .progress-text {
170
+                margin-left: 10px;
171
+                font-size: 15px;
172
+                color: #409eff;
173
+            }
174
+        }
175
+    }
176
+
177
+    .activity-time-panel {
178
+        float: right;
179
+        padding: 7px 0;
180
+
181
+        .time {
182
+            font-size: 15px;
183
+            color: #a8b3ba;
184
+        }
185
+    }
186
+}
187
+</style>
188
+

+ 151 - 0
src/scrm_pages/marketing_tool/components/unapproved_cell.vue Wyświetl plik

@@ -0,0 +1,151 @@
1
+<template>
2
+<div class="clearfix">
3
+    <div class="unapproved-cell">
4
+        <div class="activity-image-panel">
5
+            <span class="status-text">未通过</span>
6
+            <img :src="activity.poster_photo" />
7
+        </div>
8
+        <div class="activity-info-panel">
9
+            <h3 class="title">
10
+                <a href="/">{{ activity.title }}</a>
11
+            </h3>
12
+            <div class="reason">
13
+                审核未通过:{{ activity.reason }}
14
+            </div>
15
+            <div class="operation">
16
+                <el-button type="primary" size="small" icon="el-icon-edit-outline">编辑</el-button>
17
+                <el-button type="danger" size="small" icon="el-icon-delete">删除</el-button>
18
+            </div>
19
+        </div>
20
+        <div class="activity-time-panel">
21
+            <span class="time">{{ start_time }}</span>
22
+        </div>
23
+    </div>
24
+</div>
25
+</template>
26
+
27
+<script>
28
+import { parseTime } from "@/utils"
29
+
30
+export default {
31
+    name: "UnapprovedActivityCell",
32
+    props: {
33
+        activity: {
34
+            type: Object,
35
+            required: true,
36
+        }
37
+    },
38
+    data() {
39
+        return {
40
+            
41
+        }
42
+    },
43
+    computed: {
44
+        start_time: function() {
45
+            return parseTime(this.activity.start_time, "{y}-{m}-{d}")
46
+        },
47
+    },
48
+}
49
+</script>
50
+
51
+<style scoped rel="stylesheet/scss" lang="scss">
52
+.unapproved-cell {
53
+    padding: 20px 15px;
54
+    border: none;
55
+    border-bottom: 1px solid #e5e8ea;
56
+    float: left;
57
+    margin: 0;
58
+    width: 100%;
59
+    border-radius: 0;
60
+    position: relative;
61
+
62
+    .activity-image-panel {
63
+        width: 155px;
64
+        height: 122px;
65
+        border: 1px #dee2e5 solid;
66
+        display: flex;
67
+        justify-content: center;
68
+        position: relative;
69
+        -webkit-border-radius: 4px;
70
+        -moz-border-radius: 4px;
71
+        border-radius: 4px;
72
+        overflow: hidden;
73
+        float: left;
74
+
75
+        .status-text {
76
+            position: absolute;
77
+            font-size: 12px;
78
+            color: #fff;
79
+            top: 14px;
80
+            left: 3px;
81
+            -webkit-transform: rotate(316deg);
82
+            transform: rotate(316deg);
83
+        }
84
+
85
+        img {
86
+            width: 100%;
87
+            height: 100%;
88
+            object-fit: cover;
89
+            object-position: center;
90
+        }
91
+    }
92
+    .activity-image-panel::before {
93
+        border-top: 28px solid #ff7979;
94
+        border-right: 28px solid transparent;
95
+        border-bottom: 28px solid transparent;
96
+        border-left: 28px solid #ff7979;
97
+        position: absolute;
98
+        top: 0;
99
+        left: 0;
100
+        width: 0;
101
+        height: 0;
102
+        display: block;
103
+        content: "";
104
+    }
105
+
106
+    .activity-info-panel {
107
+        padding: 7px 20px;
108
+        width: 60%;
109
+        float: left;
110
+
111
+        .title {
112
+            padding-bottom: 5px;
113
+
114
+            a {
115
+                color: #495060;
116
+                font-size: 20px;
117
+                max-width: 100%;
118
+                font-weight: 500;
119
+                overflow: hidden;
120
+                white-space: nowrap;
121
+                text-overflow: ellipsis;
122
+                display: inline-block;
123
+            }
124
+        }
125
+
126
+        .reason {
127
+            color: #ff7979;
128
+            font-size: 14px;
129
+            justify-content: space-between;
130
+            line-height: 30px;
131
+        }
132
+
133
+        .operation {
134
+            padding: 10px 0 0;
135
+        }
136
+    }
137
+
138
+    .activity-time-panel {
139
+        float: right;
140
+        padding: 7px 0;
141
+
142
+        .time {
143
+            font-size: 15px;
144
+            color: #a8b3ba;
145
+        }
146
+    }
147
+}
148
+</style>
149
+
150
+
151
+

+ 1 - 0
src/scrm_pages/members/members.vue Wyświetl plik

@@ -215,6 +215,7 @@
215 215
         GetMembers(){
216 216
             GetMembers(this.listQuery).then(response=>{
217 217
                 var res = response.data;
218
+                console.log("res是谁?",res)
218 219
                 if(res.state == 1) {
219 220
                     this.membersData = res.data.members;
220 221
                     this.total = res.data.total;