<!--
|
* @Author: lzhe lzhe@example.com
|
* @Date: 2024-03-26 10:28:33
|
* @LastEditors: lzhe lzhe@example.com
|
* @LastEditTime: 2024-05-09 18:06:28
|
* @FilePath: /smart-web/src/views/master/person/main/index.vue
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
-->
|
<template>
|
<div class="aposcope-main">
|
<div class="aposcope-left">
|
<div class="left-title">业务列表</div>
|
<el-tree :data="tableData" node-key="id" default-expand-all :expand-on-click-node="false" :props="defalutProps" @node-click="handleNodeClick" ref="treeRef" highlight-current>
|
<template #default="{ node, data }">
|
<span>{{ node.label }}( {{ data.startCount }} )</span>
|
</template>
|
</el-tree>
|
</div>
|
<div class="aposcope-right">
|
<div class="right-top">
|
业务描述:-
|
</div>
|
<div class="right-content">
|
<div class="content-title">
|
<span class="ct-span">通知方式</span>
|
<el-icon><Setting /></el-icon>
|
</div>
|
<el-row class="template-content-box">
|
<el-col :span="8" v-for="(item,index) in contentData">
|
<el-checkbox v-model="item.checked" label="选择" size="large" />
|
<div class="box-top">
|
<div class="box-top-name">{{item.notifyName}}</div>
|
<div class="box-top-title">{{item.notifyTemplateName}}</div>
|
<div class="box-top-btn">
|
<span @click="table_edit(item, index)"><el-icon><EditPen /></el-icon>编辑</span>
|
<span><el-icon><Delete /></el-icon>删除</span>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
<div class="content-title">
|
<span class="ct-span">默认对象</span>
|
</div>
|
<div class="template-content-box">
|
<el-radio-group v-model="radio1">
|
<el-radio :label="1">部门</el-radio>
|
<el-radio :label="2">员工</el-radio>
|
</el-radio-group>
|
<div class="content">
|
<el-button type="primary" plain>点击添加+</el-button>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<save-dialog v-if="dialog.save" ref="saveDialog" @success="addbusinessSuccess" @closed="dialog.save=false"></save-dialog>
|
</template>
|
<script>
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
let icons = []
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
icons.push(key)
|
}
|
import saveDialog from './editbusiness'
|
export default {
|
name: "business",
|
data(){
|
return {
|
radio1: 1,
|
checked1: true,
|
tableData: [],
|
contentData: [],
|
dialog: {
|
save: false
|
},
|
defalutProps: {
|
label: 'label',
|
children: 'children',
|
isLeaf: 'hasChildren',
|
disabled: 'disabled'
|
},
|
lastLevelId: "",
|
current: "1",
|
size: "15",
|
}
|
},
|
created(){
|
|
},
|
mounted(){
|
this.getTreeList();
|
this.getbusiness();
|
},
|
components: {
|
...ElementPlusIconsVue,saveDialog
|
},
|
methods: {
|
table_edit(row){
|
this.dialog.save = true
|
this.$HTTP.get(`/api/blade-notify/notifier/template/dingTalk/dingTalkMessage/config/metadata`).then(res=> {
|
if(res.code == 200) {
|
this.dialog.save = true;
|
this.$nextTick(() => {
|
this.$refs.saveDialog.open('edit').setData(res.data);
|
})
|
}
|
})
|
},
|
getbusiness() {
|
this.$HTTP.get("/api/blade-notify/business-notify?businessKey=maintenance").then(res=> {
|
if(res.code == 200) {
|
res.data.businessNotifyDTOList.forEach(item=> {
|
item.checked = (item.status == '0'?false: true);
|
})
|
this.contentData = res.data.businessNotifyDTOList;
|
console.log(this.contentData)
|
}
|
})
|
},
|
handleNodeClick(data) {
|
if(data.code) {
|
this.lastLevelId = data.id;
|
// this.$HTTP.post("/api/blade-cps/workstation-wcs-feedback/page?current=1&size=15",obj).then(res=> {
|
// if(res.code == 200) {
|
// this.searchDataList = res.data.records;
|
// }
|
// })
|
}
|
},
|
getTreeList() {
|
this.$HTTP.get("/api/blade-notify/business-notify/tree").then(res=> {
|
if(res.code == 200) {
|
this.tableData = res.data;
|
}
|
})
|
},
|
// table_del(row) {
|
// this.$confirm(`确定将选择数据删除?`, '', {
|
// type: 'warning'
|
// }).then(() => {
|
// var arr = [row.id]
|
// this.$HTTP.delete("/api/blade-cps/workstation-wcs-feedback",arr).then(res=> {
|
// if(res.code == 200) {
|
// this.$message.success("操作成功");
|
// this.getlist();
|
// }
|
// })
|
// }).catch(() => {
|
|
// })
|
// },
|
addbusinessSuccess() {
|
//this.getlist();
|
}
|
}
|
}
|
</script>
|
<style scoped>
|
.aposcope-main {
|
display: flex;
|
min-height: 100%;
|
margin: 8px;
|
}
|
.aposcope-left {
|
width: 240px;
|
margin-right: 8px;
|
padding: 4px;
|
background-color: #fff;
|
}
|
.aposcope-right {
|
flex: 1;
|
padding: 8px;
|
background-color: #fff;
|
}
|
.left-title {
|
font-size: 16px;
|
text-align: center;
|
height: 38px;
|
line-height: 38px;
|
border-bottom: 1px solid #e2e2e2;
|
background-color: #409eff;
|
color: #fff;
|
border-radius: 2px 2px 0 0;
|
}
|
.right-content {
|
text-align: centefter;
|
}
|
.right-top {
|
width: 100%;
|
padding: 8px 16px;
|
background-color: #409eff;
|
color: #fff;
|
font-size: 13px;
|
line-height: 18px;
|
}
|
.content-title {
|
display: flex;
|
justify-content: space-between;
|
margin: 24px 0 0 0;
|
padding: 0 20px 0 10px;
|
border-left: 6px solid #3b8e8e;
|
}
|
.ct-span {
|
color: #101010;
|
font-size: 13px;
|
font-weight: 700;
|
}
|
.content-title i {
|
font-size: 20px;
|
color: #409eff;
|
cursor: pointer;
|
}
|
.template-content-box {
|
padding: 12px 0px 24px 20px;
|
}
|
.box-top {
|
height: 117px;
|
border-radius: 2px;
|
background: #fff;
|
margin-right: 20px;
|
box-shadow: 0 1px 3px rgba(0,0,0,.16);
|
position: relative;
|
}
|
.content {
|
padding: 10px;
|
border: 1px solid #409eff;
|
width: 500px;
|
height: 200px;
|
overflow: auto;
|
}
|
.box-top-name {
|
font-weight: 700;
|
font-size: 18px;
|
text-align: left;
|
color: #333;
|
display: block;
|
margin-top: -30px;
|
margin-left: 56px;
|
}
|
.box-top-title {
|
font-size: 14px;
|
text-align: left;
|
color: #333;
|
display: block;
|
margin-top: -30px;
|
margin-left: 56px;
|
padding: 0 20px 0 33px;
|
margin: 20px 0 10px 24px;
|
}
|
.box-top-btn {
|
position: absolute;
|
font-size: 14px;
|
right: 12px;
|
bottom: 12px;
|
cursor: pointer;
|
}
|
.box-top-btn span:nth-child(1) {
|
margin-right: 12px;
|
}
|
</style>
|