Commit 98f3dab2 authored by Mac's avatar Mac

1

parent a86046b3
...@@ -112,10 +112,10 @@ ...@@ -112,10 +112,10 @@
<el-form-item label="固定时段:" v-if="peopletype==2"> <el-form-item label="固定时段:" v-if="peopletype==2">
<div v-for="(x,y) in addMsg " :key="y" > <div v-for="(x,y) in addMsg " :key="y" >
<div style="display: flex;align-items: flex-start;margin-top: 10px;"> <div style="display: flex;align-items: flex-start;margin-top: 10px;">
<el-time-select :disabled="y==0" placeholder="起始时间" v-model="x.StartHours" <el-time-select :disabled="y==0" placeholder="起始时间" v-model="x.StartHours" @change="changeTime()"
:picker-options="{ start: '00:00', step: '01:00', end: '23:00', }"> :picker-options="{ start: '00:00', step: '01:00', end: '23:00', }">
</el-time-select> </el-time-select>
<el-time-select :disabled="y==0" placeholder="结束时间" v-model="x.EndHours" <el-time-select :disabled="y==0" placeholder="结束时间" v-model="x.EndHours"@change="changeTime()"
:picker-options="{ start: '00:00', step: '01:00', end: '23:00', minTime: x.StartHours}"> :picker-options="{ start: '00:00', step: '01:00', end: '23:00', minTime: x.StartHours}">
</el-time-select> </el-time-select>
<div style="max-width: 320px;"> <div style="max-width: 320px;">
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
//获取部门下拉数据 //获取部门下拉数据
getDepartList(id) { getDepartList(id) {
let msg = { let msg = {
School_Id: 0 School_Id: -1
} }
getDeptTree(msg).then(res => { getDeptTree(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -282,8 +282,8 @@ ...@@ -282,8 +282,8 @@
closeEditOrder() { closeEditOrder() {
this.$emit('close') this.$emit('close')
}, },
queryEmployee() {//下拉人员列表 queryEmployee() {//下拉人员列表 IsLeave=1排除了离职的
queryEmployee({}).then(res => { queryEmployee({IsLeave:1}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.Employeelist = res.Data this.Employeelist = res.Data
} }
...@@ -514,6 +514,10 @@ ...@@ -514,6 +514,10 @@
} }
} }
}) })
},
changeTime(){
console.log('进入')
console.log(this.addMsg)
} }
} }
......
...@@ -134,10 +134,10 @@ ...@@ -134,10 +134,10 @@
<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(1)' /> v-if="membertype==2" @click='getMember2(1)' />
<div v-if="ryList.length>0 && membertype==2" style="margin-top: 8px;"> <div v-if="showMember.length>0 && membertype==2" style="margin-top: 8px;">
<span style="margin-left: 15px">已选择{{ryList.length}}名成员</span> <span style="margin-left: 15px">已选择{{showMember.length}}名成员</span>
<span style="cursor: pointer;color: #1890ff;margin-left: 15px;" <span style="cursor: pointer;color: #1890ff;margin-left: 15px;"
@click='ryList =[],showMember=[]'>重置</span> @click='showMember=[]'>重置</span>
</div> </div>
</div> </div>
...@@ -200,31 +200,6 @@ ...@@ -200,31 +200,6 @@
</q-card-actions> </q-card-actions>
</div> </div>
<!-- 人员选择 -->
<el-dialog custom-class='w700' title="选择人员" :visible.sync="outerVisible" center>
<div class="fl" style="width: 300px; margin: 0 20px;">
<p style="margin: 0 0 10px 0;">选择: <el-input class='w200' placeholder="输入关键字进行过滤" v-model="filterText"
@input="getmemlist">
</el-input>
</p>
<el-tree class='ApprovalProcessBg' :data="memberList" show-checkbox :filter-node-method="filterNode"
ref="tree" :props="defaultProps" :render-after-expand="false" node-key="Id"
:check-on-click-node="true" @check-change="handleNodeChange">
</el-tree>
</div>
<div class="fl">
<p style="margin: 0 0 20px 0;">已选:</p>
<div class="Approval_yxList">
<li v-for="(item,index) in showMember">{{item.EmployeeName}}
<i @click="mySetCheckedKeys(item.Id,index)" class="el-icon-circle-close showMemberIcon"></i>
</li>
</div>
</div>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp;
<button class="normalBtn" type="primary" @click="getmember">确实</button>
</div>
</el-dialog>
<!-- 图片 --> <!-- 图片 -->
<selectMaterial v-if="isshowselectMaterial" :materialType="materialType" :classifyList='classifyList' <selectMaterial v-if="isshowselectMaterial" :materialType="materialType" :classifyList='classifyList'
@close="getclose()" @success='getsuccess'> @close="getclose()" @success='getsuccess'>
...@@ -237,6 +212,10 @@ ...@@ -237,6 +212,10 @@
<videofrom v-if="issvideofrom" @close="getxcxclose()" @success='getvideosuccess' :classifyList='classifyList'> </videofrom> <videofrom v-if="issvideofrom" @close="getxcxclose()" @success='getvideosuccess' :classifyList='classifyList'> </videofrom>
<!-- 文件 --> <!-- 文件 -->
<filefrom v-if="isfilefrom" @close="getxcxclose()" @success='getfilesuccess' :classifyList='classifyList'> </filefrom> <filefrom v-if="isfilefrom" @close="getxcxclose()" @success='getfilesuccess' :classifyList='classifyList'> </filefrom>
<!-- 人员选择 -->
<choiceapproval v-if="outerVisible" @close="outerVisible = false" @success="getsuccess2" :byval='showMember' :cptype="choiceapprovaltype"></choiceapproval>
</div> </div>
</template> </template>
...@@ -252,9 +231,11 @@ ...@@ -252,9 +231,11 @@
import appletform from "../../components/enterprise/applet-form" import appletform from "../../components/enterprise/applet-form"
import videofrom from "../../components/enterprise/video-from" import videofrom from "../../components/enterprise/video-from"
import filefrom from "../../components/enterprise/file-from" import filefrom from "../../components/enterprise/file-from"
import choiceapproval from '../../components/enterprise/choiceapproval'
import { import {
queryEmployee getEmployeeAddrBook
} from '../../api/users/user' } from '../../api/users/user'
export default { export default {
meta: { meta: {
...@@ -266,6 +247,7 @@ ...@@ -266,6 +247,7 @@
appletform,//小程序 appletform,//小程序
videofrom,//视频 videofrom,//视频
filefrom,//文件 filefrom,//文件
choiceapproval
}, },
name: "welcomeList", name: "welcomeList",
data() { data() {
...@@ -277,7 +259,6 @@ ...@@ -277,7 +259,6 @@
allmemberList: [], allmemberList: [],
showMember: [], showMember: [],
membertype: '1', membertype: '1',
ryList: [],
addMsg: { addMsg: {
Id: 0, Id: 0,
UserIdList: [],//成员列表 UserIdList: [],//成员列表
...@@ -297,19 +278,32 @@ ...@@ -297,19 +278,32 @@
classifyList: [], classifyList: [],
issvideofrom:false, issvideofrom:false,
isfilefrom:false isfilefrom:false,
choiceapprovaltype:'1'
} }
}, },
created() { created() {
this.getWeChatMediumGroupList() this.getWeChatMediumGroupList()
if(this.$route.query && this.$route.query.Id){ this.getMember()
this.getWeChatWelcomesInfo()//获取详情
}
}, },
methods: { methods: {
getMember() {
getEmployeeAddrBook({}).then(res => {
if (res.Code == 1) {
this.memberList = res.Data
if(this.$route.query && this.$route.query.Id){
this.getWeChatWelcomesInfo()//获取详情 //在获取了人员列表再获取详情
}
}
}).catch(() => {
if(this.$route.query && this.$route.query.Id){
this.getWeChatWelcomesInfo()//获取详情
}
})
},
getWeChatWelcomesInfo() { getWeChatWelcomesInfo() {
getWeChatWelcomesInfo({WelcomeId:this.$route.query.Id}).then(res => { getWeChatWelcomesInfo({WelcomeId:this.$route.query.Id}).then(res => {
if(res.Code==1){ if(res.Code==1){
...@@ -321,61 +315,56 @@ ...@@ -321,61 +315,56 @@
this.addMsg.UserIdList = data.UserIdList this.addMsg.UserIdList = data.UserIdList
this.MediumModel = data.MediumList?data.MediumList:[] this.MediumModel = data.MediumList?data.MediumList:[]
this.getMember2(2) this.showMember = []
if(this.addMsg.UserIdList && this.addMsg.UserIdList.length>0){
}
})
},
getWeChatMediumGroupList() {
getWeChatMediumGroupList({}).then(res => {
this.classifyList = res.Data
})
},
getMember2(type) {
if(type==1){
this.outerVisible = true
}
this.dialogTitle = this.$t('fnc.xzrenyuan');
queryEmployee({}).then(res => {
if (res.Code == 1) {
this.memberList = res.Data;
this.allmemberList = JSON.parse(JSON.stringify(res.Data));
if(type==2){
let idsList = []
this.addMsg.UserIdList.map(j=>{ this.addMsg.UserIdList.map(j=>{
if (j == -1) { if (j == -1) {
this.membertype = '1' this.membertype = '1'
return return
} else { } else {
this.membertype = '2' this.membertype = '2'
this.allmemberList.map(x=>{ if(this.memberList && this.memberList.length>0){
if(x.Id == j){ this.memberList.map(x=>{
idsList.push(x) if(x.DeptId == j){
this.showMember.push(x)
}else{
if(x.ChildList && x.ChildList.length>0){
this.getChildList(x.ChildList,j)
}
}
return return
} })
}) }
} }
}) })
this.ryList = JSON.parse(JSON.stringify(idsList))
this.showMember = JSON.parse(JSON.stringify(idsList))
} }
}
}).catch(() => {
}
}) })
var arr = []; },
getChildList(list,j){
this.showMember.forEach(x => { list.map(x=>{
arr.push(x.Id); if(x.DeptId == j){
}) this.showMember.push(x)
setTimeout(()=>{ }else{
if (this.$refs.tree) { if(x.ChildList && x.ChildList.length>0){
this.$refs.tree.setCheckedKeys(arr); this.getChildList(x.ChildList,j)
}
} }
},100) return
})
},
getWeChatMediumGroupList() {
getWeChatMediumGroupList({}).then(res => {
this.classifyList = res.Data
})
},
getMember2(type) {
this.outerVisible = true
}, },
mySetCheckedKeys(id, index) { mySetCheckedKeys(id, index) {
...@@ -404,18 +393,8 @@ ...@@ -404,18 +393,8 @@
if (!value) return true; if (!value) return true;
return data.DepartmentName.indexOf(value) !== -1; return data.DepartmentName.indexOf(value) !== -1;
}, },
getmemlist() {
if (this.filterText === '') {
this.memberList = JSON.parse(JSON.stringify(this.allmemberList))
} else {
const needle = this.filterText.toLowerCase()
this.memberList = this.allmemberList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
},
getmember() {//人员确定选择
this.outerVisible = false;
this.ryList = JSON.parse(JSON.stringify(this.showMember))
},
insert() { insert() {
this.addMsg.Content = this.addMsg.Content + '##客户名称##' this.addMsg.Content = this.addMsg.Content + '##客户名称##'
}, },
...@@ -511,14 +490,18 @@ ...@@ -511,14 +490,18 @@
this.ISidentical(data) this.ISidentical(data)
this.isfilefrom = false; this.isfilefrom = false;
}, },
getsuccess2(list,type){
this.showMember = list;
this.outerVisible = false
},
savemove() {//保存 savemove() {//保存
if (this.membertype == 1) { if (this.membertype == 1) {
this.addMsg.UserIdList = ["-1"]; this.addMsg.UserIdList = ["-1"];
} else { } else {
if (this.ryList.length > 0) { if (this.showMember.length > 0) {
this.addMsg.UserIdList = [] this.addMsg.UserIdList = []
this.ryList.forEach(x => { this.showMember.forEach(x => {
this.addMsg.UserIdList.push(x.Id) this.addMsg.UserIdList.push(x.DeptId)
}) })
} else { } else {
this.$q.notify({ this.$q.notify({
...@@ -564,6 +547,8 @@ ...@@ -564,6 +547,8 @@
position: 'top' position: 'top'
}) })
this.goblck() this.goblck()
}).catch((e) => {
this.loading = false
}) })
}, },
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
<div class="q-gutter-sm" style="width: 120%;padding: 15px;border: 1px solid #e8e8e8;"> <div class="q-gutter-sm" style="width: 120%;padding: 15px;border: 1px solid #e8e8e8;">
<ul v-if="Lableshow == false"> <ul v-if="Lableshow == false">
<li class="tag-item" v-for="(x,y) in LableList" :key='y'> <li class="tag-item" v-for="(x,y) in LableList" :key='y'>
<el-tag effect="plain"> {{ x.Name }} </el-tag> <el-tag effect="plain" style="min-width: 70px;text-align: center;overflow: hidden;"> {{ x.Name }} </el-tag>
<div class="tag-content"> <div class="tag-content">
<span class="ant-tag" :class="{'ant-tag-has-color':item.chek}" <span class="ant-tag" :class="{'ant-tag-has-color':item.chek}"
v-for="(item,index) in x.ChildList" :key='index' v-for="(item,index) in x.ChildList" :key='index'
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
<el-table-column prop="EmpName" label="名称" align="center"> </el-table-column> <el-table-column prop="EmpName" label="名称" align="center"> </el-table-column>
<el-table-column prop="LimitNum" label="上限" align="center"> <el-table-column prop="LimitNum" label="上限" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input style="width: 150px;" type='number' v-model="scope.row.LimitNum" <el-input style="width: 150px;" type='number' v-model="scope.row.LimitNum" :min='0' @input="$forceUpdate()"
size="mini" placeholder="" /> size="mini" placeholder="" />
</template> </template>
</el-table-column> </el-table-column>
...@@ -325,6 +325,8 @@ ...@@ -325,6 +325,8 @@
<q-btn color="white" v-if="addMsg.Type==2" text-color="black" icon='add' label="选择企业成员" @click="outerVisible=true,byval=EmpBackUpList,choiceapprovaltype='2'" /> <q-btn color="white" v-if="addMsg.Type==2" text-color="black" icon='add' label="选择企业成员" @click="outerVisible=true,byval=EmpBackUpList,choiceapprovaltype='2'" />
</div> </div>
<div style="color: red;">(备用员工的选择最好不要和员工上限模块里的人员重复)</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -806,7 +808,7 @@ ...@@ -806,7 +808,7 @@
}) })
}, },
queryEmployee() {//下拉人员列表 queryEmployee() {//下拉人员列表
queryEmployee({}).then(res => { queryEmployee({IsLeave:1}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.Employeelist = res.Data this.Employeelist = res.Data
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<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-input @input="changePage(1)" clearable standout="bg-primary text-white" v-model="msg.Name" <q-input @keyup.enter.native="changePage(1)" clearable standout="bg-primary text-white" v-model="msg.Name"
label="渠道码名称" @clear="changePage(1)" maxlength="20" /> label="渠道码名称" @clear="changePage(1)" maxlength="20" />
</div> </div>
<div class="col-3"> <div class="col-3">
...@@ -28,10 +28,15 @@ ...@@ -28,10 +28,15 @@
</template> </template>
<template v-slot:body-cell-WXQRCode="props"> <template v-slot:body-cell-WXQRCode="props">
<q-td :props="props"> <q-td :props="props">
<q-img v-if="props.row.WXQRCode && props.row.WXQRCode!=''" :src="props.row.WXQRCode" <q-img v-if="props.row.WXQRCode && props.row.WXQRCode!=''" :src="props.row.WXQRCode" @click="viewDetails(props.row)"
style="width: 90px;height: 90px;display: flex;"> style="width: 90px;height: 90px;display: flex;">
</q-img> </q-img>
</q-td>
</template>
<template v-slot:body-cell-Type="props">
<q-td :props="props">
<div>{{props.row.Type==1?'单人':'多人'}}</div> <div>{{props.row.Type==1?'单人':'多人'}}</div>
</q-td> </q-td>
</template> </template>
...@@ -71,18 +76,19 @@ ...@@ -71,18 +76,19 @@
</q-table> </q-table>
</div> </div>
<q-dialog v-model="isDetails"> <q-dialog v-model="isDetails">
<q-card style="width: 560px;"> <q-card style="width: 450px;">
<q-card-section class="row items-center q-pb-none"> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">欢迎语详情</div> <div class="text-h6">图片详情</div>
<q-space /> <q-space />
<q-btn icon="close" flat round dense v-close-popup /> <q-btn icon="close" flat round dense v-close-popup />
</q-card-section> </q-card-section>
<q-card-section v-if='Detailsobj' class="channelcodeList"> <q-card-section v-if="Detailsobj && Detailsobj.WXQRCode">
<q-img :src="Detailsobj.WXQRCode" style="width:400px;height: 400px;margin-left: 9px;"></q-img>
</q-card-section> </q-card-section>
</q-card> </q-card>
</q-dialog> </q-dialog>
</div> </div>
</template> </template>
...@@ -125,9 +131,9 @@ ...@@ -125,9 +131,9 @@
], ],
//公告column //公告column
columns: [{ columns: [{
name: '二维码', name: 'WXQRCode',
label: '二维码', label: '二维码',
field: '二维码', field: 'WXQRCode',
align: 'left' align: 'left'
}, },
{ {
...@@ -142,6 +148,12 @@ ...@@ -142,6 +148,12 @@
label: '分组', label: '分组',
align: 'left' align: 'left'
}, },
{
name: 'Type',
field: 'Type',
label: '分组',
align: 'left'
},
{ {
name: 'CustomerNum', name: 'CustomerNum',
field: 'CustomerNum', field: 'CustomerNum',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<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-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.Name" <q-input @keyup.enter.native="resetSearch" clearable standout="bg-primary text-white" v-model="msg.Name"
label="分组名称" @clear="resetSearch" maxlength="20" /> label="分组名称" @clear="resetSearch" maxlength="20" />
</div> </div>
</div> </div>
......
...@@ -107,6 +107,15 @@ ...@@ -107,6 +107,15 @@
</div> </div>
<div v-if="item.Type==5" style="width: 1px; flex:1">
<video width="300" height="200" controls="controls" v-if="item.VideoModel && item.VideoModel.VideoPath">
<source :src="item.VideoModel.VideoPath" type="video/ogg" />
<source :src="item.VideoModel.VideoPath" type="video/mp4" />
<source :src="item.VideoModel.VideoPath" type="video/webm" />
</video>
</div>
<div v-if="item.Type==6" <div v-if="item.Type==6"
style="width: 70%;padding: 10px 15px; border: 1px solid #eee; border-radius: 4px; background: #fff;"> style="width: 70%;padding: 10px 15px; border: 1px solid #eee; border-radius: 4px; background: #fff;">
<div>{{item.AppletModel.Title}}</div> <div>{{item.AppletModel.Title}}</div>
...@@ -115,6 +124,24 @@ ...@@ -115,6 +124,24 @@
</div> </div>
<div v-if="item.Type==7" style="width: 1px; flex:1;padding: 10px 15px; border: 1px solid #eee; border-radius: 4px; background: #fff;">
<div style="display: flex;align-items: flex-start;justify-content: space-between;" @click="showUpLoadFile(item.FileModel)">
<div style="width: 1px;flex:1">
{{item.FileModel.FileName}}
</div>
<div style="width: 50px;text-align: right;margin-left: 10px;">
<i v-if="item.FileModel.FilePath.substring(item.FileModel.FilePath.lastIndexOf('.')+1,item.FileModel.FilePath.length).toUpperCase()=='PDF'" class="iconfont icon-pdf"></i>
<i v-else-if="item.FileModel.FilePath.substring(item.FileModel.FilePath.lastIndexOf('.')+1,item.FileModel.FilePath.length).toUpperCase()=='TXT'" class="iconfont icon-txt"></i>
<i v-else-if="item.FileModel.FilePath.substring(item.FileModel.FilePath.lastIndexOf('.')+1,item.FileModel.FilePath.length).toUpperCase()=='DOCX' ||
item.FileModel.FilePath.substring(item.FileModel.FilePath.lastIndexOf('.')+1,item.FileModel.FilePath.length).toUpperCase()=='DOC'
" class="iconfont icon-word"></i>
<i v-else class="iconfont icon-excel"></i>
</div>
</div>
</div>
</div> </div>
</div> </div>
...@@ -297,7 +324,27 @@ ...@@ -297,7 +324,27 @@
viewDetails(row) { viewDetails(row) {
this.Detailsobj = row this.Detailsobj = row
this.isDetails = true this.isDetails = true
} },
showUpLoadFile(i) {
// 文件类型进行判断
if (
i.FileName.substring(
i.FileName.lastIndexOf(".") + 1,
i.FileName.length
).toUpperCase() == "PDF" ||
i.FileName.substring(
i.FileName.lastIndexOf(".") + 1,
i.FileName.length
).toUpperCase() == "TXT"
) {
this.previewPDF(i.Url);
} else {
window.open(
"https://view.officeapps.live.com/op/view.aspx?src=" + i.FilePath
);
}
},
} }
} }
...@@ -371,4 +418,15 @@ ...@@ -371,4 +418,15 @@
align-items: center; align-items: center;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
} }
.welcomeList .icon-excel,
.welcomeList .icon-pdf,
.welcomeList .icon-txt,
.welcomeList .icon-wenjian,
.welcomeList .icon-yasuobao,
.welcomeList .icon-shipin,
.welcomeList .icon-word {
font-size: 38px;
color: green;
line-height: 75px;
}
</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