Commit 9515e750 authored by 黄奎's avatar 黄奎
parents 49342f4d 48e5f316
......@@ -153,3 +153,27 @@ export function SetSynvEduEmployee(data) {
data
})
}
/**
* 获取欢迎语分页列表
*
*/
export function getWeChatWelcomesPageList(data) {
return request({
url: '/QYWeChat/GetWeChatWelcomesPageList',
method: 'post',
data
})
}
/**
* 新增修改欢迎语
*
*/
export function setWeChatWelcomesInfo(data) {
return request({
url: '/QYWeChat/SetWeChatWelcomesInfo',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -345,6 +345,7 @@
addMsg: {
Id: 0,
Type: 1,
Is_Sync:1,//是否同步 暂时默认为1 同步
MediaGroupId: '',
}
......@@ -353,6 +354,7 @@
created() {
if (this.editobj != null) {
this.addMsg = this.editobj
this.addMsg.Is_Sync=1
} else {
this.gettype()
}
......@@ -361,6 +363,7 @@
gettype() {
this.addMsg.Id = 0;
this.addMsg.Type = this.type
this.addMsg.Is_Sync = 1;
this.addMsg.MediaGroupId = '';
if (this.type == 1) {//文本
this.addMsg.TextModel = {
......
......@@ -6,8 +6,9 @@
</div>
</div> -->
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table no-bottom-table"
separator="none" title="" :data="dataList" :columns="columns" row-key="name">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table no-bottom-table" separator="none" title="" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:body-cell-title="props">
<q-td :props="props">
......@@ -17,6 +18,7 @@
<template v-slot:body-cell-Content="props">
<q-td :props="props">
<div style="width: 200px;">
<span v-if="props.row.Type==1">{{getType(props.row,'content')}}</span>
<q-img v-if="props.row.Type==2 || props.row.Type==3 || props.row.Type==6"
:src="getType(props.row,'content')" style="width: 80px;height: 80px;border-radius: 6px;display: flex;">
......@@ -44,13 +46,15 @@
" class="iconfont icon-word"></i>
<i v-else class="iconfont icon-excel"></i>
</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="编辑" v-if="props.row.Type==1 || props.row.Type==3 || props.row.Type==6 "
@click="goedit(props.row)" />
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="编辑"
v-if="props.row.Type==1 || props.row.Type==3 || props.row.Type==6 " @click="goedit(props.row)" />
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="移动"
@click="plmove(props)" />
<q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs" label="删除"
......@@ -95,8 +99,8 @@
Isadd: false,
ISsystem: false,
editobj:null,
showtype:1,
editobj: null,
showtype: 1,
msg: {
pageIndex: 1,
pageSize: 10,
......@@ -243,18 +247,18 @@
this.editobj.Id = row.Id;
this.editobj.MediaGroupId = row.MediaGroupId;
this.editobj.Type = row.Type;
if(row.Type==1){
if (row.Type == 1) {
this.editobj.TextModel = JSON.parse(JSON.stringify(row.TextModel));
}else if(row.Type==3){
} else if (row.Type == 3) {
this.editobj.ImgTextModel = JSON.parse(JSON.stringify(row.ImgTextModel));
}else if(row.Type==6){
} else if (row.Type == 6) {
this.editobj.AppletModel = JSON.parse(JSON.stringify(row.AppletModel));
}
this.showtype = row.Type.toString()
this.Isadd = true
},
getchildren(){
getchildren() {
this.$emit('editsuccess')
this.Isadd = false
},
......
This diff is collapsed.
<template>
<div class="welcomeList page-body">
<!-- <div class="page-search row items-center">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name"
v-model="msg.Type" ref="Id" :options="typeList" label="类型" :dense="false" emit-value
map-options />
</div>
</div>
</div> -->
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">欢迎语列表</div>
<q-space />
<q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add"
label="新增欢迎语" @click="goadd()"></q-btn>
<q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add" label="新增欢迎语"
@click="goadd()"></q-btn>
</template>
<template v-slot:body-cell-Type="props">
<q-td :props="props">
<span v-if="props.row.Type==1">图文</span>
<span v-if="props.row.Type==1">文本</span>
<span v-if="props.row.Type==2">图片</span>
<span v-if="props.row.Type==3">图文</span>
<span v-if="props.row.Type==4">小程序</span>
</q-td>
</template>
<template v-slot:body-cell-Content="props">
......@@ -27,13 +34,15 @@
</div>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs"
label="编辑" @click="goDetailed(props.row,'0')" />
<q-btn flat size="xs" icon="delete" style="font-weight:400;color: #3FC4FF" class="q-mr-xs"
label="删除" @click="goDetailed(props.row,'0')" />
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="编辑"
@click="goedit(props.row)" />
<q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs" label="删除"
@click="goDetailed(props.row)" />
</q-td>
</template>
<template v-slot:bottom>
......@@ -44,10 +53,12 @@
</div>
</div>
</template>
<script>
</template>
<script>
import {
getWeChatWelcomesPageList,
} from '../../api/system/wechat';
export default {
meta: {
......@@ -58,16 +69,21 @@
return {
loading: false,
ISsystem: false,
data: [{Type:1,Content:'文本:您好,##客户名称##!亲~你終於來啦!!我是你的专属顾问,任何有关日语学习问题都可以问我哦!!~~~~~~~~~~ 加入甲鹤大家庭~优惠天天有 第一条~9.9块日语体验课!! 第二条~每周活动免费参加! 第三条~猛戳我,”赞羊”电商优惠券免费送!! 第四条~再戳我,”旅游优惠券”我再送! ~~~~~从现在起”甲鹤日语”就是你学习日语的好帮手!! 现在回复”甲鹤”两个字~看看甲鹤想给你看甚么?~呵呵呵!',applymember:'通用',UpdateTime:'2021-08-04 15:48'}],
data: [],
pageCount: 0,
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
Month: '',
TeacherId: 0,
State: 0,
pageSize: 15,
rowsPerPage: 15,
Type: 0,
},
typeList:[
{Id:0,Name:'不限'},
{Id:1,Name:'文本'},
{Id:2,Name:'图片'},
{Id:3,Name:'图文'},
{Id:4,Name:'小程序'},
],
//公告column
columns: [{
name: 'Type',
......@@ -81,11 +97,17 @@
align: 'left',
},
{
name: 'applymember',
field: 'applymember',
name: 'UserIdName',
field: 'UserIdName',
label: '使用成员',
align: 'left'
},
{
name: 'UpdateByName',
field: 'UpdateByName',
label: '创建者',
align: 'left'
},
{
name: 'UpdateTime',
field: 'UpdateTime',
......@@ -102,24 +124,54 @@
}
},
created() {
this.getList()
},
methods: {
changePage(e){
changePage(e) {
this.msg.pageIndex = 1
this.getList()
},
getList() {
this.loading = true
getWeChatWelcomesPageList(this.msg).then(res => {
this.loading = false
this.data = res.Data.PageData;
this.pageCount = res.Data.Count
this.data.forEach(x=>{
x.UserIdName=''
x.UserIdList.map((j,i)=>{
if(j==-1){
x.UserIdName='通用'
return
}else{
if(i+1!=x.UserIdList.length){
x.UserIdName=x.UserIdName+'某某、'
}else{
x.UserIdName=x.UserIdName+'某某'
}
}
})
})
})
},
goadd(){
goadd() {
this.$router.push({
path:'/enterprise/addWelcome',
path: '/enterprise/addWelcome',
});
},
goedit(){//编辑
},
goDetailed(row){//修改
console.log(row)
}
}
}
</script>
</script>
<style>
<style>
.welcomeList .Sysuser_Date .el-input--prefix .el-input__inner {
background-color: red;
border: 0;
......@@ -164,8 +216,8 @@
background: transparent !important;
border: 0 !important;
}
.welcomeList .el-drawer.rtl{
.welcomeList .el-drawer.rtl {
overflow: inherit;
}
</style>
\ No newline at end of file
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment