提交 38d5df16 authored 作者: 王诒正's avatar 王诒正

用户群组

上级 d40d8151
import httpRequest from '@/utils/axios'
// 特征模板列表
export function characteristicsTemplateList(params = {}) {
return httpRequest.get('/api/opera/v1/oprations/characteristics-templates', { params })
}
// 创建用户群特征模板
export function characteristicsTemplateCreate(data) {
var headers = {
'Content-Type': 'application/json'
}
return httpRequest.post('/api/opera/v1/oprations/characteristics-template', data, { headers })
}
// 特征模板详情
export function characteristicsTemplateInfo(id, params) {
return httpRequest.get(`/api/opera/v1/oprations/${id}/characteristics-template`, { params })
}
// 更新特征模板
export function characteristicsTemplateUpdate(id, data) {
return httpRequest.get(`/api/opera/v1/oprations/${id}/characteristics-template`, data)
}
// 删除特征模板
export function characteristicsTemplateDelete(id) {
return httpRequest.delete(`/api/opera/v1/oprations/${id}/characteristics-template`)
}
...@@ -55,19 +55,23 @@ ...@@ -55,19 +55,23 @@
<div v-if="scope.row.characteristics.length === 0"><span>无用户群相关特征...</span></div> <div v-if="scope.row.characteristics.length === 0"><span>无用户群相关特征...</span></div>
<div v-else> <div v-else>
<el-button type="text" @click="dialogVisible = true">点击查看用户群特征</el-button> <el-button type="text" @click="dialogVisible = true">点击查看用户群特征</el-button>
<el-dialog :title="scope.row.name" :visible.sync="dialogVisible" :modal="false"> <div class="dialog-box" v-if="dialogVisible">
<i v-for="characteristic in scope.row.characteristics"> <el-dialog :title="scope.row.name" :visible.sync="dialogVisible" :modal="false">
<div v-if="characteristic.context"> <div class="scroll-content">
{{ characteristic.name + ':'}} <i v-for="(characteristic, index) in scope.row.characteristics" :key="index">
<span v-for="contextInfo in JSON.parse(characteristic.context)"><br/>{{contextInfo.options + '、' + contextInfo.options_info +'. '}}</span> <div v-if="characteristic.context" class="scroll-container">
<br/> {{ characteristic.name + ':'}}
<span v-for="(contextInfo, index) in JSON.parse(characteristic.context)" :key="index"><br/>{{contextInfo.options + '、' + contextInfo.options_info +'. '}}</span>
<br/>
</div>
</i>
</div> </div>
</i> <div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer"> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button @click="dialogVisible = false">取 消</el-button> <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button> </div>
</div> </el-dialog>
</el-dialog> </div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -133,5 +137,26 @@ export default { ...@@ -133,5 +137,26 @@ export default {
</script> </script>
<style> <style>
.dialog-box{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 999;
background: rgba(0,0,0,.3);
}
.dialog-zindex{
z-index: 9999999;
}
.scroll-container{
width: 100%;
height: 30%;
overflow: auto;
}
.scroll-content{
width: 100%;
height: 30%;
background-color: rgb(248, 212, 224);
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论