Commit 6c03ffa1 authored by Mac's avatar Mac

1

parent c73e753d
...@@ -54,8 +54,10 @@ ...@@ -54,8 +54,10 @@
<div> <div>
<q-dialog v-model="IsShow" persistent> <q-dialog v-model="IsShow" persistent>
<q-card style="width: 800px; max-width: 80vw;"> <q-card style="width: 800px; max-width: 80vw;">
<q-card-section> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">小程序</div> <div class="text-h6">小程序</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
......
...@@ -54,8 +54,10 @@ ...@@ -54,8 +54,10 @@
<div> <div>
<q-dialog v-model="IsShow" persistent> <q-dialog v-model="IsShow" persistent>
<q-card style="width: 800px; max-width: 80vw;"> <q-card style="width: 800px; max-width: 80vw;">
<q-card-section> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">图文</div> <div class="text-h6">图文</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
......
...@@ -37,8 +37,10 @@ ...@@ -37,8 +37,10 @@
<div class="selectMaterial"> <div class="selectMaterial">
<q-dialog v-model="IsShow" persistent> <q-dialog v-model="IsShow" persistent>
<q-card style="width: 900px; max-width: 80vw;"> <q-card style="width: 900px; max-width: 80vw;">
<q-card-section> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">选择素材</div> <div class="text-h6">选择素材</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<q-radio v-model="membertype" val="1" label="通用" /> <q-radio v-model="membertype" val="1" label="通用" />
<q-radio v-model="membertype" val="2" label="指定企业成员" /> <q-radio v-model="membertype" val="2" label="指定企业成员" />
<q-btn color="accent" label="选择成员" size='sm' class="q-mr-md" style="margin-left: 20px;" <q-btn color="accent" label="选择成员" size='sm' class="q-mr-md" style="margin-left: 20px;"
v-if="membertype==2" @click='getMember2' /> v-if="membertype==2" @click='getMember2(1)' />
<div v-if="ryList.length>0 && membertype==2" style="margin-top: 8px;"> <div v-if="ryList.length>0 && membertype==2" style="margin-top: 8px;">
<span style="margin-left: 15px">已选择{{ryList.length}}名成员</span> <span style="margin-left: 15px">已选择{{ryList.length}}名成员</span>
<span style="cursor: pointer;color: #1890ff;margin-left: 15px;" <span style="cursor: pointer;color: #1890ff;margin-left: 15px;"
...@@ -187,6 +187,7 @@ ...@@ -187,6 +187,7 @@
import { import {
setWeChatWelcomesInfo, setWeChatWelcomesInfo,
getWeChatMediumGroupList, getWeChatMediumGroupList,
getWeChatWelcomesInfo
} from '../../api/system/wechat'; } from '../../api/system/wechat';
import selectMaterial from "../../components/enterprise/selectMaterial" import selectMaterial from "../../components/enterprise/selectMaterial"
import imagetextform from "../../components/enterprise/imagetext-form" import imagetextform from "../../components/enterprise/imagetext-form"
...@@ -235,33 +236,81 @@ ...@@ -235,33 +236,81 @@
} }
}, },
created() { created() {
this.getWeChatMediumGroupList() this.getWeChatMediumGroupList()
if(this.$route.query && this.$route.query.Id){
this.getWeChatWelcomesInfo()//获取详情
}
}, },
methods: { methods: {
getWeChatWelcomesInfo() {
getWeChatWelcomesInfo({WelcomeId:this.$route.query.Id}).then(res => {
if(res.Code==1){
let data = res.Data
this.addMsg.Id = data.Id
this.addMsg.Type = data.Type
this.addMsg.Content = data.Content
this.addMsg.MediumIds = data.MediumIds
this.addMsg.UserIdList = data.UserIdList
this.MediumModel = data.MediumList?data.MediumList:[]
this.getMember2(2)
}
})
},
getWeChatMediumGroupList() { getWeChatMediumGroupList() {
getWeChatMediumGroupList({}).then(res => { getWeChatMediumGroupList({}).then(res => {
this.classifyList = res.Data this.classifyList = res.Data
}) })
}, },
getMember2() { getMember2(type) {
this.outerVisible = true; if(type==1){
this.outerVisible = true
}
this.dialogTitle = this.$t('fnc.xzrenyuan'); this.dialogTitle = this.$t('fnc.xzrenyuan');
queryEmployee({}).then(res => { queryEmployee({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.memberList = res.Data; this.memberList = res.Data;
this.allmemberList = JSON.parse(JSON.stringify(res.Data)); this.allmemberList = JSON.parse(JSON.stringify(res.Data));
if(type==2){
let idsList = []
this.addMsg.UserIdList.map(j=>{
if (j == -1) {
this.membertype = '1'
return
} else {
this.membertype = '2'
this.allmemberList.map(x=>{
if(x.Id == j){
idsList.push(x)
return
}
})
}
})
this.ryList = JSON.parse(JSON.stringify(idsList))
this.showMember = JSON.parse(JSON.stringify(idsList))
}
} }
}).catch(() => { }).catch(() => {
}) })
var arr = []; var arr = [];
this.showMember.forEach(x => { this.showMember.forEach(x => {
arr.push(x.Id); arr.push(x.Id);
}) })
if (this.$refs.tree) { setTimeout(()=>{
this.$refs.tree.setCheckedKeys(arr); if (this.$refs.tree) {
} this.$refs.tree.setCheckedKeys(arr);
}
},100)
}, },
mySetCheckedKeys(id, index) { mySetCheckedKeys(id, index) {
var arr = []; var arr = [];
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<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"> <!-- <div class="col-3">
<q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name" v-model="msg.Type" <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 /> ref="Id" :options="typeList" label="类型" :dense="false" emit-value map-options />
</div> </div> -->
</div> </div>
</div> </div>
...@@ -28,24 +28,30 @@ ...@@ -28,24 +28,30 @@
</template> </template>
<template v-slot:body-cell-Content="props"> <template v-slot:body-cell-Content="props">
<q-td :props="props"> <q-td :props="props">
<div style="max-width: 800px;white-space: normal;"> <div style="max-width: 700px; overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;">
{{props.row.Content}} {{props.row.Content}}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-UserIdName="props"> <template v-slot:body-cell-UserIdName="props">
<q-td :props="props"> <q-td :props="props">
<div style="max-width: 300px;white-space: normal;"> <div style="max-width: 300px; overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;">
{{props.row.UserIdName}} {{props.row.UserIdName}}
</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="iconfont icon-view" style="font-weight:400;color: #3FC4FF" class="q-mr-xs"
label="详情" @click="viewDetails(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="goedit(props.row)" /> @click="goedit(props.row)" />
<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="删除"
...@@ -58,6 +64,64 @@ ...@@ -58,6 +64,64 @@
</template> </template>
</q-table> </q-table>
</div> </div>
<q-dialog v-model="isDetails">
<q-card style="width: 560px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">欢迎语详情</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<q-card-section v-if='Detailsobj' class="welcomeList">
<div>使用成员:{{Detailsobj.UserIdName}}</div>
<div class="box_l">
<div class="boxl_title">
<span style="margin-left:24px ;color: rgba(0,0,0,.85); font-weight: 500; font-size: 16px;">客户账号</span>
</div>
<div style="padding: 20px;">
<div style="display: flex;align-items: flex-start;">
<i class="el-icon-user" style="margin-right:20px;font-size: 40px;color: #1890ff;"></i>
<div
style="width: 1px; flex:1;background: #f3f6fb;word-wrap: break-word;padding: 10px;border-radius: 4px;min-height: 40px;">
{{Detailsobj.Content}}
</div>
</div>
<div style="display: flex;align-items: flex-start;margin-top: 15px;" v-for="(item,index) in Detailsobj.MediumList"
:key="index">
<i class="el-icon-user" style="margin-right:20px;font-size: 40px;color: #1890ff;"></i>
<div v-if="item.Type==2" style="width: 1px; flex:1;">
<q-img :src="item.ImageModel.ImagePath" style="width: 70%;">
</q-img>
</div>
<div v-if="item.Type==3"
style="width: 1px; flex:1;padding: 10px 15px; border: 1px solid #eee; border-radius: 4px; background: #fff;">
<div>{{item.ImgTextModel.Title}}</div>
<div style="display: flex;align-items: flex-start;justify-content: space-between;">
<div style="width: 1px;flex:1">
{{item.ImgTextModel.Description}}
</div>
<q-img :src="item.ImgTextModel.ImgPath" style="width: 80px;height: 80px;margin-left: 10px;">
</q-img>
</div>
</div>
<div v-if="item.Type==6"
style="width: 70%;padding: 10px 15px; border: 1px solid #eee; border-radius: 4px; background: #fff;">
<div>{{item.AppletModel.Title}}</div>
<q-img :src="item.AppletModel.ImagePath" style="width: 100%;">
</q-img>
</div>
</div>
</div>
</div>
</q-card-section>
</q-card>
</q-dialog>
</div> </div>
</template> </template>
...@@ -97,8 +161,9 @@ ...@@ -97,8 +161,9 @@
], ],
//公告column //公告column
columns: [{ columns: [{
name: 'Type', name: 'Id',
label: '欢迎语类型', label: 'Id',
field: 'Id',
align: 'left' align: 'left'
}, },
{ {
...@@ -131,8 +196,9 @@ ...@@ -131,8 +196,9 @@
field: 'DeptId' field: 'DeptId'
} }
], ],
memberList:[], memberList: [],
isDetails: false,
Detailsobj: null
} }
}, },
created() { created() {
...@@ -171,22 +237,20 @@ ...@@ -171,22 +237,20 @@
} else { } else {
if (i + 1 != x.UserIdList.length) { if (i + 1 != x.UserIdList.length) {
console.log(1) this.memberList.map(z => {
this.memberList.map(z=>{ if (z.Id == j) {
if(z.Id == j){ x.UserIdName = x.UserIdName + z.EmployeeName + '、'
x.UserIdName = x.UserIdName + z.EmployeeName+'、'
} }
return return
}) })
} else { } else {
console.log(2) this.memberList.map(z => {
this.memberList.map(z=>{ if (z.Id == j) {
if(z.Id == j){
x.UserIdName = x.UserIdName + z.EmployeeName x.UserIdName = x.UserIdName + z.EmployeeName
} }
return return
}) })
} }
} }
}) })
...@@ -198,11 +262,15 @@ ...@@ -198,11 +262,15 @@
path: '/enterprise/addWelcome', path: '/enterprise/addWelcome',
}); });
}, },
goedit() {//编辑 goedit(row) {//编辑
this.$router.push({
path: '/enterprise/addWelcome',
query: {
Id: row.Id
}
});
}, },
goDetailed(row) {//删除 goDetailed(row) {//删除
console.log(row)
this.$q.dialog({ this.$q.dialog({
title: '提示信息', title: '提示信息',
message: '是否确定删除所此欢迎语?', message: '是否确定删除所此欢迎语?',
...@@ -225,6 +293,10 @@ ...@@ -225,6 +293,10 @@
}).onCancel(() => { }).onCancel(() => {
}); });
},
viewDetails(row) {
this.Detailsobj = row
this.isDetails = true
} }
} }
...@@ -281,4 +353,22 @@ ...@@ -281,4 +353,22 @@
.welcomeList .el-drawer.rtl { .welcomeList .el-drawer.rtl {
overflow: inherit; overflow: inherit;
} }
.welcomeList .box_l {
width: 400px;
border-radius: 6px;
margin-right: 15px;
background: #fff;
margin-top:20px;margin-left: 10px;
box-shadow: 0px 0px 10px rgba(191, 191, 191, 0.7);
}
.welcomeList .boxl_title {
width: 100%;
height: 56px;
display: flex;
align-items: center;
border-bottom: 1px solid #e8e8e8;
}
</style> </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