bug
This commit is contained in:
@@ -113,6 +113,13 @@
|
|||||||
<el-radio-button size="small" label="1">已执行</el-radio-button>
|
<el-radio-button size="small" label="1">已执行</el-radio-button>
|
||||||
<el-radio-button size="small" label="2">无法执行</el-radio-button>
|
<el-radio-button size="small" label="2">无法执行</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
<div class="userSelcet" placeholder="请选择创建人">
|
||||||
|
<span v-if="search1.deptartId"><ai-open-data type="departmentName" :openid="search1.deptartId"></ai-open-data></span>
|
||||||
|
<span v-else>请选择</span>
|
||||||
|
<ai-user-get :instance="instance" @change="e => onUserChange(e, 'search1')" isChooseUnit :isMultiple="false" v-model="user1">
|
||||||
|
<div class="select-btn">选择</div>
|
||||||
|
</ai-user-get>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="sendMsg(0)">提醒成员发送</el-button>
|
<el-button type="primary" @click="sendMsg(0)">提醒成员发送</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,7 +132,7 @@
|
|||||||
:current.sync="search1.current"
|
:current.sync="search1.current"
|
||||||
:size.sync="search1.size"
|
:size.sync="search1.size"
|
||||||
@getList="getMemberInfo">
|
@getList="getMemberInfo">
|
||||||
<el-table-column slot="user" label="成员" align="center">
|
<el-table-column slot="user" label="成员" align="left">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<span>
|
<span>
|
||||||
@@ -175,6 +182,13 @@
|
|||||||
<el-radio-button size="small" label="1">已执行</el-radio-button>
|
<el-radio-button size="small" label="1">已执行</el-radio-button>
|
||||||
<el-radio-button size="small" label="2">无法执行</el-radio-button>
|
<el-radio-button size="small" label="2">无法执行</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
<div class="userSelcet" placeholder="请选择创建人">
|
||||||
|
<span v-if="search2.deptartId"><ai-open-data type="departmentName" :openid="search2.deptartId"></ai-open-data></span>
|
||||||
|
<span v-else>请选择</span>
|
||||||
|
<ai-user-get :instance="instance" @change="e => onUserChange(e, 'search2')" isChooseUnit :isMultiple="false" v-model="user2">
|
||||||
|
<div class="select-btn">选择</div>
|
||||||
|
</ai-user-get>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="sendMsg(1)">提醒成员发送</el-button>
|
<el-button type="primary" @click="sendMsg(1)">提醒成员发送</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -222,6 +236,8 @@
|
|||||||
return {
|
return {
|
||||||
total1: 0,
|
total1: 0,
|
||||||
total2: 0,
|
total2: 0,
|
||||||
|
user1: [],
|
||||||
|
user2: [],
|
||||||
radio1: '未执行',
|
radio1: '未执行',
|
||||||
search1: {
|
search1: {
|
||||||
current: 1,
|
current: 1,
|
||||||
@@ -279,7 +295,22 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
sendMsg (type) {
|
onUserChange (e, search) {
|
||||||
|
if (e.length) {
|
||||||
|
this[search].deptartId = e[0].id
|
||||||
|
} else {
|
||||||
|
this[search].deptartId = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
this[search].current = 1
|
||||||
|
if (search === 'search1') {
|
||||||
|
this.getMemberInfo()
|
||||||
|
} else {
|
||||||
|
this.getGroupInfo()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
sendMsg () {
|
||||||
this.instance.post(`/app/appmasssendingtask/remindSend?id=${this.params.id}`).then(res => {
|
this.instance.post(`/app/appmasssendingtask/remindSend?id=${this.params.id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success('提醒成功')
|
this.$message.success('提醒成功')
|
||||||
@@ -364,6 +395,38 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.userSelcet {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
margin-left: 12px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #d0d4dc;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.select-btn {
|
||||||
|
width: 40px;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: center;
|
||||||
|
border-left: 1px solid #d0d4dc;
|
||||||
|
color: #666;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #2266FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
width: 200px;
|
||||||
|
padding: 0 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
background: #F5F5F5;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.userinfo {
|
.userinfo {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -553,6 +616,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,13 @@
|
|||||||
@change="search.current = 1, getList()"
|
@change="search.current = 1, getList()"
|
||||||
placeholder="选择群发结束日期">
|
placeholder="选择群发结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
<div class="userSelcet" placeholder="请选择创建人">
|
||||||
|
<span v-if="search.createUserId"><ai-open-data type="userName" :openid="search.createUserId"></ai-open-data></span>
|
||||||
|
<span v-else>请选择</span>
|
||||||
|
<ai-user-get isStrictly :instance="instance" @change="onUserChange" :isMultiple="false" v-model="user">
|
||||||
|
<div class="select-btn">选择</div>
|
||||||
|
</ai-user-get>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template slot="right">
|
<template slot="right">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -82,104 +89,111 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
export default {
|
||||||
|
name: 'List',
|
||||||
|
|
||||||
export default {
|
props: {
|
||||||
name: 'List',
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
|
||||||
props: {
|
data() {
|
||||||
instance: Function,
|
return {
|
||||||
dict: Object
|
search: {
|
||||||
},
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
status: '',
|
||||||
|
createUserId: '',
|
||||||
|
taskTitle: '',
|
||||||
|
startTime: '',
|
||||||
|
endTime: ''
|
||||||
|
},
|
||||||
|
user: [],
|
||||||
|
tableData: [],
|
||||||
|
loading: false,
|
||||||
|
total: 0,
|
||||||
|
colConfigs: [
|
||||||
|
{ prop: 'taskTitle', label: '任务名称' },
|
||||||
|
{ prop: 'sendType', label: '群发类型', formart: v => v === '0' ? '立即发送' : '定时发送', align: 'center' },
|
||||||
|
{ slot: 'user', label: '创建人', openType: 'userName', align: 'center' },
|
||||||
|
{ prop: 'createTime', label: '群发时间', align: 'center' },
|
||||||
|
{ prop: 'status', label: '状态', formart: v => this.dict.getLabel('mstStatus', v), align: 'center' },
|
||||||
|
{ prop: 'completionRate', label: '任务完成率', align: 'center' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
created () {
|
||||||
return {
|
this.dict.load('mstStatus', 'mstSendType').then(() => {
|
||||||
search: {
|
this.getList()
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
status: '',
|
|
||||||
taskTitle: '',
|
|
||||||
startTime: '',
|
|
||||||
endTime: ''
|
|
||||||
},
|
|
||||||
tableData: [],
|
|
||||||
loading: false,
|
|
||||||
total: 0,
|
|
||||||
colConfigs: [
|
|
||||||
{ prop: 'taskTitle', label: '任务名称' },
|
|
||||||
{ prop: 'sendType', label: '群发类型', formart: v => v === '0' ? '立即发送' : '定时发送', align: 'center' },
|
|
||||||
{ slot: 'user', label: '创建人', openType: 'userName', align: 'center' },
|
|
||||||
{ prop: 'createTime', label: '群发时间', align: 'center' },
|
|
||||||
{ prop: 'status', label: '状态', formart: v => this.dict.getLabel('mstStatus', v), align: 'center' },
|
|
||||||
{ prop: 'completionRate', label: '任务完成率', align: 'center' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
...mapState(['user'])
|
|
||||||
},
|
|
||||||
|
|
||||||
created () {
|
|
||||||
this.dict.load('mstStatus', 'mstSendType').then(() => {
|
|
||||||
this.getList()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
getList() {
|
|
||||||
this.loading = true
|
|
||||||
this.instance.post(`/app/appmasssendingtask/list`, null, {
|
|
||||||
params: {
|
|
||||||
...this.search,
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.total = res.data.total
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.loading = false
|
|
||||||
this.$store.dispatch('initOpenData')
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
remove(id) {
|
methods: {
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
onUserChange (e) {
|
||||||
this.instance.post(`/app/appmasssendingtask/delete?ids=${id}`).then(res => {
|
if (e.length) {
|
||||||
|
this.search.createUserId = e[0].wxOpenUserId
|
||||||
|
} else {
|
||||||
|
this.search.createUserId = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
this.search.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
this.instance.post(`/app/appmasssendingtask/list`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search,
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success('删除成功!')
|
this.tableData = res.data.records
|
||||||
this.getList()
|
this.total = res.data.total
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loading = false
|
||||||
|
this.$store.dispatch('initOpenData')
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
remove(id) {
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
this.instance.post(`/app/appmasssendingtask/delete?ids=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
toAdd(id) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'Add',
|
||||||
|
params: {
|
||||||
|
id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
},
|
||||||
},
|
|
||||||
|
|
||||||
toAdd(id) {
|
toDetail (id) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'Add',
|
type: 'Detail',
|
||||||
params: {
|
params: {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
|
||||||
toDetail (id) {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'Detail',
|
|
||||||
params: {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -196,5 +210,36 @@ export default {
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.userSelcet {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #d0d4dc;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.select-btn {
|
||||||
|
width: 40px;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: center;
|
||||||
|
border-left: 1px solid #d0d4dc;
|
||||||
|
color: #666;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #2266FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
width: 200px;
|
||||||
|
padding: 0 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
background: #F5F5F5;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user