zory 2 luni în urmă
părinte
comite
0b6fb09600

BIN
public/img/douyin.png


BIN
public/img/kuaishou.png


BIN
public/img/video.png


BIN
public/img/xhs.png


+ 40 - 0
src/api/model/expert.js

@@ -0,0 +1,40 @@
+import config from "@/config"
+import http from "@/utils/request"
+
+export default {
+    list: {
+        url: `${config.API_URL}/expert/list`,
+        name: "-",
+        get: async function(data={}){
+            return await http.get(this.url, data);
+        }
+    },
+    platform: {
+        url: `${config.API_URL}/expert/platform`,
+        name: "-",
+        get: async function(data={}){
+            return await http.get(this.url, data);
+        }
+    },
+    save: {
+        url: `${config.API_URL}/expert/save`,
+        name: "-",
+        post: async function(data={}){
+            return await http.post(this.url, data);
+        }
+    },
+    del: {
+        url: `${config.API_URL}/expert/del`,
+        name: "-",
+        post: async function(data={}){
+            return await http.post(this.url, data);
+        }
+    },
+    batch: {
+        url: `${config.API_URL}/expert/batch`,
+        name: "-",
+        post: async function(data={}){
+            return await http.post(this.url, data);
+        }
+    }
+}

BIN
src/assets/image/douyin.png


BIN
src/assets/image/kuaishou.png


BIN
src/assets/image/video.png


BIN
src/assets/image/xhs.png


+ 61 - 0
src/views/manage/expert/index/components/detail.vue

@@ -0,0 +1,61 @@
+<template>
+    <el-dialog :title="titleMap[mode]" v-model="visible" :width="600" destroy-on-close @closed="$emit('closed')">
+        <el-descriptions direction="vertical" :border="true" :column="2">
+            <el-descriptions-item label="达人姓名">{{ formData.truename }}</el-descriptions-item>
+            <el-descriptions-item label="联系电话">{{ formData.mobile }}</el-descriptions-item>
+            <el-descriptions-item label="常驻城市">{{ formData.city }}</el-descriptions-item>
+            <el-descriptions-item label="身份证号码">{{ formData.idcard }}</el-descriptions-item>
+            <el-descriptions-item label="性别">
+                <el-tag type="success" v-if="formData.sex==1">男</el-tag>
+                <el-tag type="danger" v-if="formData.sex==2">女</el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="是否已婚">
+                <el-tag type="success" v-if="formData.married==1">已婚</el-tag>
+                <el-tag type="danger" v-if="formData.married==2">未婚</el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="是否有小孩">
+                <el-tag type="success" v-if="formData.child==1">有</el-tag>
+                <el-tag type="danger" v-if="formData.child==2">否</el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="宠物">{{ formData.pet?formData.pet:'-' }}</el-descriptions-item>
+            <el-descriptions-item label="状态">
+                <div class="status-warning" v-if="formData.status==0"><sc-status-indicator type="warning"></sc-status-indicator> 待审核</div>
+                <div class="status-success" v-if="formData.status==1"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
+                <div class="status-danger" v-if="formData.status==2"><sc-status-indicator type="danger"></sc-status-indicator> 禁用</div>
+            </el-descriptions-item>
+        </el-descriptions>
+		<template #footer>
+            <el-button @click="visible=false" size="large">关 闭</el-button>
+		</template>
+    </el-dialog>
+    
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            loading: false,
+            mode:"add",
+            visible: false,
+            isSaveing: false,
+            titleMap:{
+                add:"达人详情",
+                edit:"达人详情"
+            },
+            formData:{}
+        }
+    },
+    methods: {
+        open(mode = 'add'){
+            this.mode = mode;
+            this.visible = true;
+            return this
+        },
+        //表单注入数据
+        setData(data){
+            this.formData = JSON.parse(JSON.stringify(data));
+        },
+    }
+}
+</script>

+ 78 - 0
src/views/manage/expert/index/components/platform.vue

@@ -0,0 +1,78 @@
+<template>
+    <el-drawer :title="titleMap[mode]" :append-to-body="true" v-model="visible" :size="1000" destroy-on-close :close-on-click-modal="false" @closed="$emit('closed')" :with-header="false">
+        <el-container class="flex-column" v-loading="loading">
+            <div class="drawer-detail-main">
+                <div class="drawer-detail-header">
+                    <div class="drawer-detail-header-body">
+                        <div class="drawer-detail-header-left">{{ titleMap[mode] }}</div>
+                        <div class="drawer-detail-header-left">
+                            <el-button type="default" icon="el-icon-close" @click="visible=false"></el-button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <el-main>
+                <div v-for="(item,index) in platformData" :key="index" class="platform-mb">
+                    <el-descriptions direction="vertical" :title="item.source_name" :border="true" :column="2">
+                        <el-descriptions-item label="平台昵称">{{ item.nickname }}</el-descriptions-item>
+                        <el-descriptions-item label="平台头像"><el-image :src="item.avatar" style="width: 40px;" :preview-src-list="[item.avatar]"></el-image></el-descriptions-item>
+                        <el-descriptions-item label="粉丝量">{{ item.follower_count_format }}</el-descriptions-item>
+                        <el-descriptions-item label="作品数量">{{ item.aweme_count_format }}</el-descriptions-item>
+                        <el-descriptions-item :label="item.source_name+'号'">{{ item.unique_id }}</el-descriptions-item>
+                        <el-descriptions-item label="获赞数量">{{ item.total_favorited_format }}</el-descriptions-item>
+                        <el-descriptions-item label="签名"><div v-html="item.signature"></div></el-descriptions-item>
+                        <el-descriptions-item label="主页地址">{{ item.url }}</el-descriptions-item>
+                    </el-descriptions>
+                </div>
+            </el-main>
+            <el-footer style="text-align: right;">
+                <el-button @click="visible=false">关闭</el-button>
+            </el-footer>
+        </el-container>
+    </el-drawer>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            loading: false,
+            mode:"add",
+            titleMap:{
+                add:"绑定平台",
+                edit:"绑定平台"
+            },
+            visible: false,
+            isSaveing: false,
+            formData:{},
+            platformData:[]
+        }
+    },
+    methods: {
+        open(mode = 'add'){
+            this.mode = mode;
+            this.visible = true;
+            return this
+        },
+        async getCategory(){
+            this.loading = true;
+            var resp = await this.$API.expert.platform.get({id:this.formData.id});
+            this.loading = false;
+            if (resp.code == 0) {
+                this.visible = false;
+                return this.$message.error(resp.msg)
+            }
+            this.platformData = resp.data;
+        },
+        //表单注入数据
+        setData(data){
+            this.formData = JSON.parse(JSON.stringify(data));
+            this.getCategory();
+        },
+    }
+}
+</script>
+
+<style>
+.platform-mb{margin-bottom: 20px;}
+</style>

+ 3 - 2
src/views/manage/expert/index/components/search.vue

@@ -14,8 +14,9 @@
                         </el-col>
                         <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="4">
                             <el-select v-model="searchKey.status" clearable placeholder="请选择状态" @change="searchForm" :style="{width: '100%'}" class="diy-select">
-                                <el-option value="1" label="正常"></el-option>
-                                <el-option value="2" label="禁用"></el-option>
+                                <el-option value="1" label="待审核"></el-option>
+                                <el-option value="2" label="正常"></el-option>
+                                <el-option value="3" label="已拒绝"></el-option>
                                 <template #prefix>状态</template>
                             </el-select>
                         </el-col>

+ 119 - 3
src/views/manage/expert/index/components/table.vue

@@ -1,21 +1,137 @@
 <template>
     <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
         <el-table-column type="selection" width="50" fixed="left"></el-table-column>
-
+        <el-table-column label="达人姓名" prop="truename" width="150"></el-table-column>
+        <el-table-column label="联系电话" prop="mobile" width="150"></el-table-column>
+        <el-table-column label="常驻城市" prop="city" width="150"></el-table-column>
+        <el-table-column label="性别" prop="truename" width="150">
+            <template #default="scope">
+                <el-tag type="success" v-if="scope.row.sex==1">男</el-tag>
+                <el-tag type="danger" v-if="scope.row.sex==2">女</el-tag>
+            </template>
+        </el-table-column>
+        <el-table-column label="绑定平台" prop="city" minWidth="150">
+            <template #default="scope">
+                <span v-if="scope.row.platform.length == 0">-</span>
+                <div class="pm-flex" v-else>
+                    <div class="pm-item" v-for="(item,index) in scope.row.platform" :key="index">
+                        <el-image style="width: 20px;" :src="'img/'+item.source+'.png'"></el-image>
+                        <span class="name">{{ item.source_name }}</span>
+                    </div>
+                </div>
+            </template>
+        </el-table-column>
+        <el-table-column label="创建时间" prop="create_at" width="150"></el-table-column>
+        <el-table-column label="状态" prop="status" align="center" width="150">
+            <template #default="scope">
+                <div class="status-warning" v-if="scope.row.status==0"><sc-status-indicator type="warning"></sc-status-indicator> 待审核</div>
+                <div class="status-success" v-if="scope.row.status==1"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
+                <div class="status-danger" v-if="scope.row.status==2"><sc-status-indicator type="danger"></sc-status-indicator> 禁用</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="操作" width="200" align="left" fixed="right">
+            <template #default="scope">
+                <el-button type="success" size="small" @click="table_detail(scope.row)">平台</el-button>
+                <el-button size="small" @click="table_view(scope.row)">详情</el-button>
+                <el-button type="danger" size="small" @click="table_del(scope.row)">删除</el-button>
+            </template>
+        </el-table-column>
     </scTable>
+    <formMain ref="formMain" @success="handleSuccess"></formMain>
+    <detailMain ref="detailMain" @success="handleSuccess"></detailMain>
+    <platformMain ref="platformMain" @success="handleSuccess"></platformMain>
 </template>
 
 <script>
+import formMain from './form';
+import detailMain from './detail';
+import platformMain from './platform';
 export default {
+    components: {
+        formMain,detailMain,platformMain
+    },
     data(){
         return {
             list: {
-                apiObj: this.$API.article.list
+                apiObj: this.$API.expert.list
             },
             dataSelect:[],
             dataSelectFull:[],
             searchKey:{}
         }
     },
+    methods: {
+        table_detail(data){
+            this.$nextTick(() => {
+                this.$refs.platformMain.open("edit").setData(data)
+            })
+        },
+        table_auth(data){
+            this.$nextTick(() => {
+                this.$refs.comboMain.open("edit").setData(data)
+            })
+        },
+        table_view(data){
+            this.$nextTick(() => {
+                this.$refs.detailMain.open("edit").setData(data)
+            })
+        },
+        table_del(data){
+            this.$confirm(`确定要执行删除吗`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var resp = await this.$API.task.del.post({"id":data.id});
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.refresh()
+            }).catch(()=>{})
+        },
+        refresh(){
+            this.$refs.table.refresh()
+        },
+        upData(data){
+            this.$refs.table.upData(data)
+        },
+        handleSuccess(){
+            this.$refs.table.refresh()
+        },
+        sortChange(event){
+            if (event.order) {
+                var data = {
+                    "field":event.prop,
+                    "order":event.order
+                }
+                this.$refs.table.upData(data)
+            } else {
+                this.$refs.table.reload(this.searchKey)
+            }
+            return ;
+        },
+        selectionChange(event){
+            this.dataSelect = [];
+            var arr = [];
+            var arrCompany = [];
+            event.forEach(function(val,index){
+                arr[index] = val.id;
+                arrCompany[index] = val;
+            });
+            this.dataSelectFull = arrCompany;
+            this.dataSelect = arr;
+            this.$emit("success",this.dataSelect);
+            this.$emit("successFull",this.dataSelectFull);
+        },
+        table_passwd(row){
+            this.$nextTick(() => {
+                this.$refs.userPasswd.open("edit").setData(row)
+            })
+        }
+    }
 }
-</script>
+</script>
+
+<style>
+.pm-flex{display: flex;align-items: center;gap: 10px;}
+.pm-flex .pm-item{display: flex;align-items: center;gap: 5px;}
+</style>

+ 14 - 2
src/views/manage/task/category/components/table.vue

@@ -2,7 +2,15 @@
     <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id" hidePagination>
         <el-table-column type="selection" width="50" fixed="left"></el-table-column>
         <el-table-column label="序号" prop="id" width="100"></el-table-column>
-        <el-table-column label="分类名称" prop="name"></el-table-column>
+        <el-table-column label="分类名称" prop="name">
+            <template #default="scope">
+                <div class="task-flex-center" v-if="scope.row.name">
+                    <div class="img" v-if="scope.row.icon"><el-image :src="scope.row.icon" fit="cover" style="width: 20px;"></el-image></div>
+                    <div class="info">{{ scope.row.name }}</div>
+                </div>
+                <el-tag v-else>-</el-tag>
+            </template>
+        </el-table-column>
         <el-table-column label="状态" prop="status" align="center">
             <template #default="scope">
                 <div class="status-success" v-if="scope.row.status==1"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
@@ -105,4 +113,8 @@ export default {
         }
     }
 }
-</script>
+</script>
+<style>
+.task-flex-center{display: flex;align-items: center;gap: 5px;}
+.task-flex-center .img{display: flex;align-items: center;}
+</style>

+ 18 - 0
src/views/manage/task/lists/components/form.vue

@@ -188,6 +188,24 @@ export default {
                 content: [
                     {required: true, message: '请输入'}
                 ],
+                category_detail: [
+                    {required: true, message: '请输入'}
+                ],
+                product_cover_url: [
+                    {required: true, message: '请输入'}
+                ],
+                product_name: [
+                    {required: true, message: '请输入'}
+                ],
+                product_id: [
+                    {required: true, message: '请输入'}
+                ],
+                product_selling_point: [
+                    {required: true, message: '请输入'}
+                ],
+                target_audience: [
+                    {required: true, message: '请输入'}
+                ]
             },
             formData:{}
         }

+ 3 - 3
src/views/manage/task/lists/components/table.vue

@@ -2,7 +2,7 @@
     <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
         <el-table-column type="selection" width="50" fixed="left"></el-table-column>
         <el-table-column label="任务编码" prop="task_sn" width="150"></el-table-column>
-        <el-table-column label="任务信息" prop="id" width="300">
+        <el-table-column label="任务信息" prop="id" minWidth="300">
             <template #default="scope">
                 <div class="info">
                     <el-tooltip effect="dark" :content="scope.row.title" placement="top-start">
@@ -14,7 +14,7 @@
                 </div>
             </template>
         </el-table-column>
-        <el-table-column label="任务平台" prop="name">
+        <el-table-column label="任务平台" prop="name" width="150">
             <template #default="scope">
                 <div class="task-flex-center" v-if="scope.row.categoryJoin">
                     <div class="img" v-if="scope.row.categoryJoin.icon"><el-image :src="scope.row.categoryJoin.icon" fit="cover" style="width: 20px;"></el-image></div>
@@ -23,7 +23,7 @@
                 <el-tag v-else>-</el-tag>
             </template>
         </el-table-column>
-        <el-table-column label="投放商品" prop="name" width="300">
+        <el-table-column label="投放商品" prop="name" minWidth="300">
             <template #default="scope">
                 <div class="task-flex">
                     <div class="img"><el-image :src="scope.row.product_cover_url" fit="cover" style="width: 40px;"></el-image></div>