Commit 48e5f316 authored by Mac's avatar Mac

1

parent 120d4220
...@@ -153,3 +153,27 @@ export function SetSynvEduEmployee(data) { ...@@ -153,3 +153,27 @@ export function SetSynvEduEmployee(data) {
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 @@ ...@@ -345,6 +345,7 @@
addMsg: { addMsg: {
Id: 0, Id: 0,
Type: 1, Type: 1,
Is_Sync:1,//是否同步 暂时默认为1 同步
MediaGroupId: '', MediaGroupId: '',
} }
...@@ -353,6 +354,7 @@ ...@@ -353,6 +354,7 @@
created() { created() {
if (this.editobj != null) { if (this.editobj != null) {
this.addMsg = this.editobj this.addMsg = this.editobj
this.addMsg.Is_Sync=1
} else { } else {
this.gettype() this.gettype()
} }
...@@ -361,6 +363,7 @@ ...@@ -361,6 +363,7 @@
gettype() { gettype() {
this.addMsg.Id = 0; this.addMsg.Id = 0;
this.addMsg.Type = this.type this.addMsg.Type = this.type
this.addMsg.Is_Sync = 1;
this.addMsg.MediaGroupId = ''; this.addMsg.MediaGroupId = '';
if (this.type == 1) {//文本 if (this.type == 1) {//文本
this.addMsg.TextModel = { this.addMsg.TextModel = {
......
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
</div> </div>
</div> --> </div> -->
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table no-bottom-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
separator="none" title="" :data="dataList" :columns="columns" row-key="name"> class="sticky-column-table no-bottom-table" separator="none" title="" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:body-cell-title="props"> <template v-slot:body-cell-title="props">
<q-td :props="props"> <q-td :props="props">
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
<template v-slot:body-cell-Content="props"> <template v-slot:body-cell-Content="props">
<q-td :props="props"> <q-td :props="props">
<div style="width: 200px;">
<span v-if="props.row.Type==1">{{getType(props.row,'content')}}</span> <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" <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;"> :src="getType(props.row,'content')" style="width: 80px;height: 80px;border-radius: 6px;display: flex;">
...@@ -44,13 +46,15 @@ ...@@ -44,13 +46,15 @@
" class="iconfont icon-word"></i> " class="iconfont icon-word"></i>
<i v-else class="iconfont icon-excel"></i> <i v-else class="iconfont icon-excel"></i>
</div> </div>
</div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="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 " <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="编辑"
@click="goedit(props.row)" /> 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="移动" <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="移动"
@click="plmove(props)" /> @click="plmove(props)" />
<q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs" label="删除" <q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs" label="删除"
...@@ -95,8 +99,8 @@ ...@@ -95,8 +99,8 @@
Isadd: false, Isadd: false,
ISsystem: false, ISsystem: false,
editobj:null, editobj: null,
showtype:1, showtype: 1,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
...@@ -243,18 +247,18 @@ ...@@ -243,18 +247,18 @@
this.editobj.Id = row.Id; this.editobj.Id = row.Id;
this.editobj.MediaGroupId = row.MediaGroupId; this.editobj.MediaGroupId = row.MediaGroupId;
this.editobj.Type = row.Type; this.editobj.Type = row.Type;
if(row.Type==1){ if (row.Type == 1) {
this.editobj.TextModel = JSON.parse(JSON.stringify(row.TextModel)); 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)); 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.editobj.AppletModel = JSON.parse(JSON.stringify(row.AppletModel));
} }
this.showtype = row.Type.toString() this.showtype = row.Type.toString()
this.Isadd = true this.Isadd = true
}, },
getchildren(){ getchildren() {
this.$emit('editsuccess') this.$emit('editsuccess')
this.Isadd = false this.Isadd = false
}, },
......
This diff is collapsed.
<template> <template>
<div class="welcomeList page-body"> <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 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>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="" :data="data" :columns="columns" row-key="name"> separator="none" title="" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">欢迎语列表</div> <div class="col-2 q-table__title">欢迎语列表</div>
<q-space /> <q-space />
<q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add" <q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add" label="新增欢迎语"
label="新增欢迎语" @click="goadd()"></q-btn> @click="goadd()"></q-btn>
</template> </template>
<template v-slot:body-cell-Type="props"> <template v-slot:body-cell-Type="props">
<q-td :props="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==2">图片</span>
<span v-if="props.row.Type==3">图文</span>
<span v-if="props.row.Type==4">小程序</span>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Content="props"> <template v-slot:body-cell-Content="props">
...@@ -27,13 +34,15 @@ ...@@ -27,13 +34,15 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="编辑"
label="编辑" @click="goDetailed(props.row,'0')" /> @click="goedit(props.row)" />
<q-btn flat size="xs" icon="delete" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" <q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs" label="删除"
label="删除" @click="goDetailed(props.row,'0')" /> @click="goDetailed(props.row)" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -44,10 +53,12 @@ ...@@ -44,10 +53,12 @@
</div> </div>
</div> </div>
</template> </template>
<script>
<script>
import {
getWeChatWelcomesPageList,
} from '../../api/system/wechat';
export default { export default {
meta: { meta: {
...@@ -58,16 +69,21 @@ ...@@ -58,16 +69,21 @@
return { return {
loading: false, loading: false,
ISsystem: false, ISsystem: false,
data: [{Type:1,Content:'文本:您好,##客户名称##!亲~你終於來啦!!我是你的专属顾问,任何有关日语学习问题都可以问我哦!!~~~~~~~~~~ 加入甲鹤大家庭~优惠天天有 第一条~9.9块日语体验课!! 第二条~每周活动免费参加! 第三条~猛戳我,”赞羊”电商优惠券免费送!! 第四条~再戳我,”旅游优惠券”我再送! ~~~~~从现在起”甲鹤日语”就是你学习日语的好帮手!! 现在回复”甲鹤”两个字~看看甲鹤想给你看甚么?~呵呵呵!',applymember:'通用',UpdateTime:'2021-08-04 15:48'}], data: [],
pageCount: 0, pageCount: 0,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 15,
rowsPerPage: 10, rowsPerPage: 15,
Month: '', Type: 0,
TeacherId: 0,
State: 0,
}, },
typeList:[
{Id:0,Name:'不限'},
{Id:1,Name:'文本'},
{Id:2,Name:'图片'},
{Id:3,Name:'图文'},
{Id:4,Name:'小程序'},
],
//公告column //公告column
columns: [{ columns: [{
name: 'Type', name: 'Type',
...@@ -81,11 +97,17 @@ ...@@ -81,11 +97,17 @@
align: 'left', align: 'left',
}, },
{ {
name: 'applymember', name: 'UserIdName',
field: 'applymember', field: 'UserIdName',
label: '使用成员', label: '使用成员',
align: 'left' align: 'left'
}, },
{
name: 'UpdateByName',
field: 'UpdateByName',
label: '创建者',
align: 'left'
},
{ {
name: 'UpdateTime', name: 'UpdateTime',
field: 'UpdateTime', field: 'UpdateTime',
...@@ -102,24 +124,54 @@ ...@@ -102,24 +124,54 @@
} }
}, },
created() { created() {
this.getList()
}, },
methods: { 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({ 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 { .welcomeList .Sysuser_Date .el-input--prefix .el-input__inner {
background-color: red; background-color: red;
border: 0; border: 0;
...@@ -164,8 +216,8 @@ ...@@ -164,8 +216,8 @@
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
.welcomeList .el-drawer.rtl{
.welcomeList .el-drawer.rtl {
overflow: inherit; overflow: inherit;
} }
</style> </style>
\ No newline at end of file
\ 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