kefu/static/templates/default/setting_kefu_list.html

239 lines
12 KiB
HTML
Raw Normal View History

2024-12-10 02:50:12 +00:00
{{template "header" }}
<div id="app" style="width:100%">
<template>
<el-container v-loading.fullscreen.lock="fullscreenLoading">
<el-main class="mainMain">
<el-button style="margin-bottom: 10px;" @click="addKefu" type="primary" size="small"><{flyLang.newUser}></el-button>
<el-form :inline="true" :model="kefuSearch" class="demo-form-inline">
<el-form-item :label="flyLang.account">
<el-input v-model="kefuSearch.name"></el-input>
</el-form-item>
<el-form-item :label="flyLang.email">
<el-input v-model="kefuSearch.email"></el-input>
</el-form-item>
<el-form-item :label="flyLang.tel">
<el-input v-model="kefuSearch.tel"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="kefuListOwnPage(1)" icon="el-icon-search" ></el-button>
</el-form-item>
</el-form>
<el-table
:empty-text="flyLang.nodata"
:data="kefuList.list"
border
style="width: 100%;">
<el-table-column
width="50px"
prop="id"
label="ID">
</el-table-column>
<el-table-column
width="50px"
prop="pid"
label="PID">
</el-table-column>
<el-table-column
prop="status"
label="接入访客/状态">
<template slot-scope="scope">
<{scope.row.rec_num}>
/
<span v-if="scope.row.online_status==1" style="color: #13ce66;">在线</span>
<span v-if="scope.row.online_status!=1">离线</span>
</template>
</el-table-column>
<el-table-column
prop="status"
label="是否开通">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-color="#13ce66"
inactive-color="#dcdfe6"
@change="switchUserStatus(scope.row.status,scope.row.id)"
>
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="img"
:label="flyLang.avator">
<template slot-scope="scope">
<el-avatar :size="50"><img :src="scope.row.avator"/></el-avatar>
</template>
</el-table-column>
<el-table-column
prop="name"
:label="flyLang.account">
</el-table-column>
<el-table-column
prop="nickname"
:label="flyLang.nickname">
<template slot-scope="scope">
<a v-show="scope.row.role_id<3" v-on:click="copyText(host+'/chatIndex?ent_id='+scope.row.id+'&kefu_id='+scope.row.name)"><{scope.row.nickname}></a>
<span v-show="scope.row.role_id==3"><{scope.row.nickname}></span>
</template>
</el-table-column>
<el-table-column
prop="role_name"
:label="flyLang.role">
</el-table-column>
<el-table-column
prop="created_at"
:label="flyLang.createTime">
</el-table-column>
<el-table-column
prop="updated_at"
:label="flyLang.updateTime">
</el-table-column>
<el-table-column
width="240px"
prop="expired_at"
:label="flyLang.expiredTime">
<template slot-scope="scope">
<el-date-picker
:clearable="false"
@change="updateUserExpired(scope.row.name,scope.row.expired_at)"
v-model="scope.row.expired_at"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</template>
</el-table-column>
<el-table-column
prop="agent_num"
:label="flyLang.accountLimit">
</el-table-column>
<el-table-column
prop="tel"
:label="flyLang.tel">
</el-table-column>
<el-table-column
prop="email"
:label="flyLang.email">
</el-table-column>
<el-table-column
width="200px;"
prop="id"
:label="flyLang.doIt">
<template slot-scope="scope">
<el-button style="display: none" title="营销二维码" v-if="scope.row.pid==1" @click="userWeixinMarketing(scope.row.name)" type="warning" icon="el-icon-camera" circle></el-button>
<el-button @click="kefuMessageDialog=true;kefuIdMessage=scope.row.id" type="text" icon="el-icon-message" >消息</el-button>
<el-button @click="getKefu(scope.row.id)" type="text" icon="el-icon-edit" >编辑</el-button>
<el-button style="display: none" v-if="scope.row.pid==1" @click="getKefu(scope.row.id)" type="text" icon="el-icon-s-tools" >配置</el-button>
<el-button @click="deleteKefu(scope.row.id)" type="text" icon="el-icon-delete" >删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@current-change="kefuListOwnPage"
:current-page="kefuList.page"
layout="prev,pager, next"
:page-size="kefuList.pagesize"
:total="kefuList.count">
</el-pagination>
</el-main>
</el-container>
<el-dialog
:visible.sync="kefuMessageDialog"
width="90%"
top="0"
>
<iframe :src="'/setting_kefu_message?page=1&id='+kefuIdMessage" frameborder="0" width="100%" height="730px"></iframe>
<span slot="footer" class="dialog-footer">
<el-button @click="kefuMessageDialog = false"><{flyLang.cancel}></el-button>
<el-button type="primary" @click="kefuMessageDialog = false"><{flyLang.confirm}></el-button>
</span>
</el-dialog>
<el-dialog
:title="flyLang.editUser"
:visible.sync="kefuDialog"
width="50%"
top="0"
:close-on-click-modal="false"
>
<el-alert
style="margin-bottom: 10px"
title="新建账号后默认是关闭状态,请在列表中点击开通一下"
type="warning">
</el-alert>
<el-form ref="kefuForm" :model="kefuForm" :rules="rules" label-width="200px">
<el-form-item :label="flyLang.account" prop="name">
<el-input v-model="kefuForm.name"></el-input>
</el-form-item>
<el-form-item :label="flyLang.password" prop="password">
<el-input v-model="kefuForm.password"></el-input>
</el-form-item>
<el-form-item :label="flyLang.nickname" prop="nickname">
<el-input v-model="kefuForm.nickname"></el-input>
</el-form-item>
<el-form-item :label="flyLang.email" prop="email">
<el-input v-model="kefuForm.email"></el-input>
</el-form-item>
<el-form-item :label="flyLang.tel" prop="tel">
<el-input v-model="kefuForm.tel"></el-input>
</el-form-item>
<el-form-item :label="flyLang.avator" prop="avator">
<el-select v-model="kefuForm.avator" :placeholder="flyLang.selectAvatar">
<el-option :label="'头像'+item" :value="'/static/images/'+item+'.jpg'" v-for="item in [0,1,2,3,4,5,6,7]" v-bind:key="item">
<el-avatar :size="30" :src="'/static/images/'+item+'.jpg'"></el-avatar>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="flyLang.role" prop="role_id" v-show="!kefuForm.id">
<el-select v-model="kefuForm.role_id" :placeholder="flyLang.selectRole">
<el-option :label="item.role_name" :value="item.role_id" v-for="item in roleList" v-bind:key="item.role_id">
</el-option>
</el-select>
</el-form-item>
<div v-if="menuAdminShow && kefuForm.role_id!=3">
<el-form-item :label="flyLang.accountLimit" prop="agent_num">
<el-input v-model="kefuForm.agent_num"></el-input>
</el-form-item>
<el-form-item label="同时接待上限(默认不限)">
<el-input v-model="maxReceiveNum" @change="setEntConfigItemByAdmin(kefuForm.id,'同时接待上限(默认不限)','VisitorMaxNum',maxReceiveNum)"></el-input>
</el-form-item>
<el-table
:data="kefuSetting"
border
style="width: 100%;margin-top: 10px">
<el-table-column
prop="conf_name"
label="配置项">
</el-table-column>
<el-table-column
prop="id"
label="配置值">
<template slot-scope="scope">
<el-input v-model="scope.row.conf_value" disabled></el-input>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="kefuDialog = false"><{flyLang.cancel}></el-button>
<el-button type="primary" @click="submitKefuForm('kefuForm')"><{flyLang.save}></el-button>
</span>
</el-dialog>
</template>
</div>
</body>
{{template "setting_bottom" .}}