Commit 0f438b40 authored by zhengke's avatar zhengke

增加im推送修改

parent 96f09f78
...@@ -68,14 +68,21 @@ ...@@ -68,14 +68,21 @@
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="绑定用户" size="small" prop="MallUserId"> <el-form-item label="绑定用户" size="small" prop="MallUserId">
<el-select style="margin-right: 10px;width:100%" v-model="msg.MallUserId" size="small" <el-select style="margin-right: 10px;width:100%" v-model="msg.MallUserId" size="small"
placeholder="请选择" > placeholder="请选择" >
<el-option v-for="item in options" :key="item.EmpId" :label="item.EmpName" :value="item.EmpId"> <el-option v-for="item in options" :key="item.EmpId" :label="item.EmpName" :value="item.EmpId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否推送IM消息">
<el-switch
v-model="msg.IsSendIMMsg"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
</el-form> </el-form>
</div> </div>
</div> </div>
...@@ -95,7 +102,8 @@ export default { ...@@ -95,7 +102,8 @@ export default {
Account:'', Account:'',
Password:'', Password:'',
Type:1, Type:1,
MallUserId:'' MallUserId:'',
IsSendIMMsg:0 //0否 1是
}, },
options:[], options:[],
rules: { rules: {
......
...@@ -58,6 +58,12 @@ ...@@ -58,6 +58,12 @@
<span v-if="scope.row.Status==4">已作废</span> <span v-if="scope.row.Status==4">已作废</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否推送IM消息">
<template slot-scope="scope">
<span style="color:red" v-if="scope.row.IsSendIMMsg==0"></span>
<span style="color:green" v-if="scope.row.IsSendIMMsg==1"></span>
</template>
</el-table-column>
<el-table-column prop="CreateDate" label="创建时间"></el-table-column> <el-table-column prop="CreateDate" label="创建时间"></el-table-column>
<el-table-column prop="UpdateDate" label="更新时间"></el-table-column> <el-table-column prop="UpdateDate" label="更新时间"></el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
...@@ -68,6 +74,16 @@ ...@@ -68,6 +74,16 @@
<el-tooltip class="item" effect="dark" content="删除" placement="top"> <el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/setup/del.png" alt="" class="temp_imgStyle" @click="DeleteTemplate(scope.row)"> <img src="../../assets/img/setup/del.png" alt="" class="temp_imgStyle" @click="DeleteTemplate(scope.row)">
</el-tooltip> </el-tooltip>
<template v-if="scope.row.IsSendIMMsg==0">
<el-tooltip class="item" effect="dark" content="开启IM推送" placement="top">
<img src="../../assets/img/userman/status_5_active.png" alt="" class="temp_imgStyle" @click="OpenImSend(scope.row)">
</el-tooltip>
</template>
<template v-if="scope.row.IsSendIMMsg==1">
<el-tooltip class="item" effect="dark" content="关闭IM推送" placement="top">
<img src="../../assets/img/userman/status_6_active.png" alt="" class="temp_imgStyle" @click="OpenImSend(scope.row)">
</el-tooltip>
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -129,6 +145,41 @@ ...@@ -129,6 +145,41 @@
} }
}) })
}); });
},
//开启IM推送
OpenImSend(item){
var type=0,text='';
if(item.IsSendIMMsg==0){
type=1
text='是否开启IM推送'
}else{
type=0
text='是否关闭IM推送'
}
let that = this;
that.$confirm(text, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let msg={
Ids:item.ID,
IsSendIMMsg:type
}
this.apipost('/api/Authorize/UpdateSendIMMsg', msg,
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
});
} }
}, },
mounted() { mounted() {
......
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